Great. Thanx.

I will try that out and get back to you ASAP

Thanks & Regards,
Sachin Gupta| iPolicy Networks

-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Igor Tandetnik
Sent: Tuesday, January 18, 2011 6:06 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to execute SQL Query via text/sql file

Sachin Gupta <scgu...@ipolicynetworks.com> 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
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to