On 11/15/06, RB Smissaert <[EMAIL PROTECTED]> wrote:
OK, writing the textfile as inserts and running that is a bit slower than
the .import, but it has one advantage and that is that comma's in the field
are no problem as the values can be enclosed in double-quotes.
With the .import I had to take the comma's out first. There weren't many
comma's and it wasn't a big problem, but it is best to go for accuracy, so
It is a bit better. Is there no way to do .import with the data in double
quotes, so that the comma's are no trouble?

Now the next thing to try is doing inserts directly from VB, from the ADO
recordset. I suppose this should be the fastest. I can think I can do it
with the VB wrapper, but not sure how to it without it. Can I do SQLite3.exe
directly with the insert data as an argument?

You can certainly do this from vb. It's a bit of work though.
You will need to read the data file and parse it yourself,
then insert the data directly. You should wrap all the inserts
in a transaction since it will speed it up greatly (this is true
for any method of doing inserts into sqlite).

You can also run the script to import it but if I recall
correctly vb lets you start a process but it takes more work
to wait for the external process to complete and then to
get it's return code from the operating system. The system
call I was familiar with just started the script running, it
didn't wait for it to finish.

I doubt you will see any significant difference in speed
between the two methods.


--
SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite

Cthulhu Bucks!
http://www.cthulhubucks.com

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to