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 sqlite3_exec().
>
> You do not n
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.
__
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, e-m
Thank you Igor
On 21 June 2011 12:52, Igor Tandetnik wrote:
> e-mail mgbg25171 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
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 ex
e-mail mgbg25171 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 integer primary key, season int, name
> text)";
> sql += "insert into
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
> s
nsert into episodes(id, season, name) Values(2,3,'bob');";
> sql += "COMMIT;";
>
> I would say most people don't do this as any error returns won't tell you
> much. You'd normally prepare each seperately.
>
>
>
>
>
> Michael D. B
o: sqlite-users@sqlite.org
Subject: EXT :[sqlite] Howto...multi-sqlite command string through
sqlite3_prepare_v2() to create SINGLE statement
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 =...&qu
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 = sqlite3_prepare(d
10 matches
Mail list logo