devram
25th October 2002, 21:11
Hi,
Could any of you share idea how to upload data from .csv file to Baan tables. especially, the string fields with quotes (') & commas (,).

zacharyg
25th October 2002, 22:05
Exchange

This sound like a task for Baan Exchange. It requires no developer knowledge.

devram
25th October 2002, 23:18
Upload has to be done through a session

Darren Phillips
26th October 2002, 00:46
If it needs to be done via a session you can call an exchange scheme from a session using wait.and.activate("tuxch0223m000,

but if you want to do it by code look at using seq.* functions there are a few threads on the board covering their use do a search for seq.open or seq.gets. but without using exchange you will have to look after all the reference issues youself.

If you only need to update one or two tables then using exchange or seq.* functions and updating the tables directly may be ok. But if your trying for example to load sales orders or inventory adjustments where there could be many tables to update, then you need to use function servers. Or customise the session if you have the source to take its data from the csv file.

Guillaume.G
4th November 2002, 16:36
You can use the AFS with the API* function.

This functionnality simulate a standard session.

Good Luck

GUillaume G.

gguymer
4th November 2002, 20:03
You can read files in and map delimited fields of each record from the file into variables in the script. These variables can then be used in an insert or update of a table with corresponding column values. Use the seq.open, seq.gets, string.scan, seq.close functions.

seq.open associates a file pointer to a file pathname.
seq.gets reads a record from the file until an eof is encountered.
string.scan maps fields in each record to variables in the script.
seq.close closes out the file opened by seq.open.

KaasKarthik
22nd October 2020, 16:28
:confused:
Hello all, i want to insert the values of csv file to baan table,(we can do it by fille operation),or else what concept i should use???
please fgive suggestion.

mark_h
22nd October 2020, 20:26
Not sure I get the question. You have several options as mentioned above - AFS, exchange or just a straight up read and insert. In our case we usually used the AFS method, but on some simple tables we did exchange schemes.