AppendDelimited

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Anonymous

AppendDelimited

Post by Anonymous »

Dear

I do not get the AppendDelimited to work.
In VO it was not a problem, any idea?

Thanks for the reply

Johan Kwaspen

Source:

oSvr_lgt := DbServer{workdir()+"lgt.dbf", false, false}

if oSvr_lgt:AppendDelimited(workdir()+"lgt.csv") = false
ErrorBox{nil, "ERROR AppendDelimited "+workdir()+"lgt.csv"}:Show();
endif

The CSV-file:
20024385,10.000
20024388,50.000
20024389,100.000
20024391,50.000
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

AppendDelimited

Post by Chris »

Hi Johan,

That's because AppendDelimited() depends on the DELIM RDD to parse the data, and this RDD (together with the SDF RDD) were never implemented in Vulcan. Guess we can do them for X#, although I am not sure if there's much interest for them.

Anyway, for now you'd need to change that code to manually parse the data and put it in the dbf file. If you need any suggestions/sample code on how to do that, please let us know.

Chris
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
JKW

AppendDelimited

Post by JKW »

Hello Chris,

Ok, I will adjust the code and parse the data manually in the dbf.

For larger data I use SQL but to read small data I still used the dbf, can I see the XML as an alternative to DBF. (max. 5 fields and 5000 records)

Thanks !

Johan Kwaspen
Post Reply