----- Original Message ----- 
From: "Xuer" <[EMAIL PROTECTED]>
> could i use a long,long sql sentence to insert many items into a table
> once without limit?
> or there IS a limit so i have to accomplish it by doing it for multi
times?

Hi,

There is no limit using the current sqlite_exec() API function. It will
compile and execute all the SQL statements in the string pointed to by the
sql parameter one after the other.

I use this to initialize a new empty database by executing all the table,
index, and trigger creation statements and then inserting fixed data into
some of the tables. This schema information is kept in a text file which is
read into memory and then executed with one call. With all the statements
executed in a single transaction it is very fast.

I have noticed that SQLite queries execute somewhat slower after this has
been done however. I have no idea why. My work around is simply to close the
database file after it is initialized, and then immediately reopen it. Now
all the queries run at full speed.

I hope this helps.

Dennis Cote


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to