Re: [sqlite] SQLite parsing of a .sql file

2010-04-09 Thread Shaun Seckman (Firaxis)
Checking for NULL on the statement fixed it :) -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Roger Binns Sent: Friday, April 09, 2010 5:43 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] SQLite parsing of

Re: [sqlite] SQLite parsing of a .sql file

2010-04-09 Thread Roger Binns
On 04/09/2010 01:25 PM, Shaun Seckman (Firaxis) wrote: > I'm running into a nasty problem towards the end of the file however. > At the very end there are 3 characters left that are just whitespace > characters. When I pass this string into sqlite3_prepare_v2() I get a > return value of 0 as if it

Re: [sqlite] SQLite parsing of a .sql file

2010-04-09 Thread Shaun Seckman (Firaxis)
eral Discussion of SQLite Database Subject: Re: [sqlite] SQLite parsing of a .sql file Ah, I missed that in the documentation. This is perfect! Precisely what I needed with much less work than copying the shell.c code. Thanks a bunch! -Original Message- From: sqlite-users-boun...@sqlite.org

Re: [sqlite] SQLite parsing of a .sql file

2010-04-09 Thread Shaun Seckman (Firaxis)
, April 09, 2010 3:24 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] SQLite parsing of a .sql file On Apr 10, 2010, at 1:51 AM, Adam DeVita wrote: > Is this a 1 off import? If so, perhaps the command line tool > can .read it. > > On Fri, Apr 9, 2010 at 2:13 PM, S

Re: [sqlite] SQLite parsing of a .sql file

2010-04-09 Thread Roger Binns
On 04/09/2010 11:13 AM, Shaun Seckman (Firaxis) wrote: > What is the best way to ensure that all commands are executed? Load the whole file into memory or memory map it. Then call sqlite3_prepare/step/reset. prepare will point you to the beginning of the next statement if there is one. > The

Re: [sqlite] SQLite parsing of a .sql file

2010-04-09 Thread Shaun Seckman (Firaxis)
te.org] On Behalf Of Adam DeVita Sent: Friday, April 09, 2010 2:52 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] SQLite parsing of a .sql file Is this a 1 off import? If so, perhaps the command line tool can .read it. On Fri, Apr 9, 2010 at 2:13 PM, Shaun Seckman (Firaxis) &l

Re: [sqlite] SQLite parsing of a .sql file

2010-04-09 Thread Dan Kennedy
On Apr 10, 2010, at 1:51 AM, Adam DeVita wrote: > Is this a 1 off import? If so, perhaps the command line tool > can .read it. > > On Fri, Apr 9, 2010 at 2:13 PM, Shaun Seckman (Firaxis) < > shaun.seck...@firaxis.com> wrote: > >> Greetings, >> >> I've got a .SQL file that contains multiple SQL

Re: [sqlite] SQLite parsing of a .sql file

2010-04-09 Thread Adam DeVita
Is this a 1 off import? If so, perhaps the command line tool can .read it. On Fri, Apr 9, 2010 at 2:13 PM, Shaun Seckman (Firaxis) < shaun.seck...@firaxis.com> wrote: > Greetings, > > I've got a .SQL file that contains multiple SQL insert statements for > various tables as well as comments embed

[sqlite] SQLite parsing of a .sql file

2010-04-09 Thread Shaun Seckman (Firaxis)
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 comm