On 04/12/2010, at 3:34 PM, Jay A. Kreibich wrote:

>  You can register a trace callback with sqlite3_trace().  The second
>  parameter of the callback will have the SQL statement, complete 
>  with expanded parameters.
> 
>  You can't get this information at an arbitrary time, however, only
>  when sqlite3_step() decides to make the callback.

Hmm, thanks. That seems to be able to provide what I am after, but is 
"considered experimental". It seems much easier and more reliable for me to 
create and track my own human readable version of my SQL statements as I create 
them.

> The trace function is designed for building debuggers and system analyzers, 
> not general application use.

Yes, I just want it for a type of trace, to show the user what SQL was executed 
as a result of their changes via GUI. I am putting this together as an in app 
(iPad, iPhone) debug and trace mechanism. If you're interested, see the sample 
screen shots here:
http://www.barefeetware.com/databare/Site/Trace.html

> You might be able to expose sqlite3VdbeExpandSql() for your own use.

Thanks for the suggestion. I tried sqlite3VdbeExpandSql() after binding but it 
doesn't substitute the parameter values in the result string.

Thanks,
Tom
BareFeetWare

 --
Comparison of SQLite GUI tools:
http://www.barefeetware.com/sqlite/compare/?ml

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to