Re: [sqlite] How to execute SQL Query via text/sql file

2011-01-18 Thread Sachin Gupta
lite-users@sqlite.org Subject: Re: [sqlite] How to execute SQL Query via text/sql file Sachin Gupta 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 semicol

Re: [sqlite] How to execute SQL Query via text/sql file

2011-01-18 Thread Igor Tandetnik
Sachin Gupta 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 cont

Re: [sqlite] How to execute SQL Query via text/sql file

2011-01-18 Thread Sachin Gupta
Subject: Re: [sqlite] How to execute SQL Query via text/sql file Sachin Gupta wrote: > We want that the SQLite schema and data be written in a text file. When the > application comes up, the SQL file can be executed to > create the schema and import the data. The text file would have t

Re: [sqlite] How to execute SQL Query via text/sql file

2011-01-18 Thread Igor Tandetnik
Sachin Gupta wrote: > We want that the SQLite schema and data be written in a text file. When the > application comes up, the SQL file can be executed to > create the schema and import the data. The text file would have the Create > Table statements and also the insert into table > statements. S

Re: [sqlite] How to execute SQL Query via text/sql file

2011-01-18 Thread Simon Slavin
On 18 Jan 2011, at 11:02am, Sachin Gupta wrote: > We want that the SQLite schema and data be written in a text file. When the > application comes up, the SQL file can be executed to create the schema and > import the data. The text file would have the Create Table statements and > also the ins

[sqlite] How to execute SQL Query via text/sql file

2011-01-18 Thread Sachin Gupta
Hi, We have been trying to embed SQLite into our application and have been quite successful so far. Thanks to all the support extended by you guys. However, we are kind of stuck trying to do the following: We want that the SQLite schema and data be written in a text file. When the application