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