Great. Thanx. I will try that out and get back to you ASAP
Thanks & Regards, Sachin Gupta| iPolicy Networks -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Igor Tandetnik Sent: Tuesday, January 18, 2011 6:06 PM To: [email protected] Subject: Re: [sqlite] How to execute SQL Query via text/sql file Sachin Gupta <[email protected]> wrote: > You mean read it line by line and pass it as const char* to sqlite3_exec? I did mean sqlite3_exec, but it doesn't have to be line by line. sqlite3_exec accepts a batch of semicolon-separated commands in a sinlge string, and executes all of them. So just load the whole contents of the file in a single buffer, and pass that to sqlite3_exec (again, assuming the file is of a reasonable size). -- Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

