>If you are trying to use a different connection, you would only see 
>changes once the first connection committed its transaction - so don't 
>do that.

>> sqlite_update_hook() returnes rowID, but I didn't
>> find any API to use this value...

>You just run a statement along the lines of

>select * from dbName.tableName where rowid=?

>You need to run this statement on the same connection the hook is 
>installed on.

Thanks. But I am experiensing some problems here. When I am using the same
connection (I store it as third parameter to callback registering function

                 sqlite3_update_hook(db, Callback, db);

and when trying to access to the db inside callback

                 sqlite3_prepare((sqlite3*)data_arg_3, [...])

, an error SQLITE_MISUSE  is returned to me (from sqlite3_prepare() as well
as sqlite3_step() ). And finally I have got a Segmentation Fault from
sqlite3_column_*().
The same with db connection as a global variable, when it is used during
registering callback and inside one.

So I supposed earlier that it is prohibited to use the same connection
inside callback. And a really I used another connection and got nothing.

So the question is - how to use the same connection correctry inside the
callback?

-- 
View this message in context: 
http://www.nabble.com/Trigger%27s-actions-and-callbacks-tp16418413p16446898.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to