Greetings,

I've got a .SQL file that contains multiple SQL insert statements for
various tables as well as comments embedded throughout.  When I
attempted to pass the file into sqlite3_exec, I found that only the
first SQL command was getting executed.  What is the best way to ensure
that all commands are executed?   Parsing the file line-by-line is
inaccurate as multiple statements may be on the same line and looking
for the next ';' character has parsing problems as well.

 

The documents state that sqlite3_complete() only returns a 1 if the
statement is complete.  Were this method to return the index into the
character array to denote WHERE the SQL statement is complete, I could
use that to parse multiple statements.

 

Does anyone have any suggestions?

 

-Shaun

 

 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to