Re: [sqlite] Howto...multi-sqlite command string through sqlite3_prepare_v2() to create SINGLE statement

2011-06-21 Thread e-mail mgbg25171
David, Simon...that's good to know...Thank you very much indeed! On 21 June 2011 13:19, Simon Slavin wrote: > > On 21 Jun 2011, at 12:59pm, e-mail mgbg25171 wrote: > > > I was looking at prepare/step/finalise as a means of avoiding the > callback > > inherent in

Re: [sqlite] Howto...multi-sqlite command string through sqlite3_prepare_v2() to create SINGLE statement

2011-06-21 Thread Simon Slavin
On 21 Jun 2011, at 12:59pm, e-mail mgbg25171 wrote: > I was looking at prepare/step/finalise as a means of avoiding the callback > inherent in sqlite3_exec(). You do not need to use the callback if you don't want it to do anything. Just pass a NULL there. Simon.

Re: [sqlite] Howto...multi-sqlite command string through sqlite3_prepare_v2() to create SINGLE statement

2011-06-21 Thread David Bicking
Since none of the statements is a SELECT, as far as I know the callback would never be called. You can pass a zero as the callback address. get_table will also handle all the statements in one pass, but will return an empty able, so you might as well use exec. David On 06/21/2011 07:59 AM,

Re: [sqlite] Howto...multi-sqlite command string through sqlite3_prepare_v2() to create SINGLE statement

2011-06-21 Thread e-mail mgbg25171
Thank you Igor On 21 June 2011 12:52, Igor Tandetnik <itandet...@mvps.org> wrote: > e-mail mgbg25171 <mgbg25...@blueyonder.co.uk> wrote: > > Howto...multi-sqlite command string through sqlite3_prepare_v2() to > create SINGLE statement > > You can't do that. >

Re: [sqlite] Howto...multi-sqlite command string through sqlite3_prepare_v2() to create SINGLE statement

2011-06-21 Thread e-mail mgbg25171
Thank you for the clarification re... sqlite3_prepareXXX() only processing 1 statement at a time as opposed to sqlite3_exec() which... can handle "combined multi statements" in one shot. I was looking at prepare/step/finalise as a means of avoiding the callback inherent in sqlite3_exec(). In the

Re: [sqlite] Howto...multi-sqlite command string through sqlite3_prepare_v2() to create SINGLE statement

2011-06-21 Thread Igor Tandetnik
e-mail mgbg25171 <mgbg25...@blueyonder.co.uk> wrote: > Howto...multi-sqlite command string through sqlite3_prepare_v2() to create > SINGLE statement You can't do that. > sql = "BEGIN"; //you need to add newline here > sql += "create table episodes (id inte

Re: [sqlite] Howto...multi-sqlite command string through sqlite3_prepare_v2() to create SINGLE statement

2011-06-21 Thread David Bicking
On 06/21/2011 07:22 AM, e-mail mgbg25171 wrote: > The commented out lines work. > I'm wondering... > a) is it possible to do what's not commented out > b) what's the syntax re the "sql =..." and "sql +=..." lines > Any help much appreciated! > > > sql = "BEGIN"; //you need to add newline here >

Re: [sqlite] Howto...multi-sqlite command string through sqlite3_prepare_v2() to create SINGLE statement

2011-06-21 Thread e-mail mgbg25171
seperately. > > > > > > Michael D. Black > > Senior Scientist > > NG Information Systems > > Advanced Analytics Directorate > > > > > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on &g

Re: [sqlite] Howto...multi-sqlite command string through sqlite3_prepare_v2() to create SINGLE statement

2011-06-21 Thread Black, Michael (IS)
entist NG Information Systems Advanced Analytics Directorate From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of e-mail mgbg25171 [mgbg25...@blueyonder.co.uk] Sent: Tuesday, June 21, 2011 6:22 AM To: sqlite-users@sqlite.org Subject:

[sqlite] Howto...multi-sqlite command string through sqlite3_prepare_v2() to create SINGLE statement

2011-06-21 Thread e-mail mgbg25171
The commented out lines work. I'm wondering... a) is it possible to do what's not commented out b) what's the syntax re the "sql =..." and "sql +=..." lines Any help much appreciated! [code] //sql = "create table episodes (id integer primary key, season int, name text);"; rc =