What you propose is absolutly correct. Also what Jan says about first are the attributes name, then the values.
Best regards, Robert
Westy:
Robert Huber:
…Does it work in your environment?
Still not working here. I am probably missing something that should be obvious.
Is the following correct? To bring comma separated values into a “contacts” table, name the source file “contacts.csv”. Then replace “TrackIT” with our database name. Then the resulting SQL statement should end up looking like:
insert into contacts (“John”,“Doe”) values (“John”,“Doe”);
Glad to hear it works with you. I am also interested in a progress bar solution if a useful one exists
Best regards, Robert
Westy:
I have it working now. Sybase ASA appears to require single quotes around the values, so I inserted a line to replace the quotes:
utils.stringReplace(globals.line,'"',"'")
and added a flushAllClientsCache at the end to redisplay the results within Servoy.
For a speed test I imported 111,000 records with a first name and a last name column. The import took about five minutes. During the import the javaw.exe and dbsrv9.exe CPU processes were in the 48 to 52 range.
What is a good way to give the user feedback on the progress of the import without slowing the import down too much?
Thank you again Robert for providing this import solution!
What is a good way to give the user feedback on the progress of the import without slowing the import down too much?
The Progress plug-in is your friend for this. http://www.it2be.com/plugins.htm#progress
You present the user with a dialog, can add options like cancel buttons etc.
You will not slow down the import in any way because the dialog runs in its own thread…