[sqlite] sqlite3_callback called even for empty tables

2007-07-19 Thread Stefan Kuhr

Hello everyone,

I hope this is not an FAQ...

In my code I call sqlite3_exec with a sqlite3_callback. I noticed that when
I do a select statement, then the callback is invoked once even if the table
is empty, but with all argv strings passed to the callback being NULL
(however with the correct argc value). Is this expected behaviour, so I
always have to check in my callback if the string parameters being passed
are non-NULL to guard against a select statement on an empty table, or is
there a more elegant solution to the problem?

Thanks for any help,

-- 
Stefan Kuhr

-- 
View this message in context: 
http://www.nabble.com/sqlite3_callback-called-even-for-empty-tables-tf4111001.html#a11689130
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Calling sqlite3_exec from within another sqlite3_exec callback?

2007-06-21 Thread Stefan Kuhr

Hello everyone,

this might be a real dumb question, but I am relatively new to database
programming and in particular to sqlite, so anyway, here it goes:

Suppose I have a call to sqlite3_exec in my code and it calls into the
callback function passed as the third parameter to this sqlite3_exec call.
Is it possible to create another sqlite3 object with a sqlite3_open to the
same database file from within this callback? Or in other words: Can I fire
a query from within a callback of a query, ore more or less nested queries?
Is this supported or even a common pattern?

TIA,

-- 
Stefan

-- 
View this message in context: 
http://www.nabble.com/Calling-sqlite3_exec-from-within-another-sqlite3_exec-callback--tf3958849.html#a11233481
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-