TWIMC,
When using the sqlite3_query command, and a callback function, is there a
way of getting the _*STATEMENT*_ for the query string which is currently
executing, reliably from the sqlite3 *opaque type??
The reason I need this, I'm using SQLITE 3.5.x to manage blobjects of
various kinds, and while I have control when using the prep/step/finalize
routines, and I can determine sqlite3_column_type of each variable
returned, and indeed, if a blob, then I can determine the length
sqlite3_column_bytes, and obtain the data sqlite3_column_blob. These
funcions require the use of the statment pointer.
As the query does not pass a link to the prepared *STATEMENT* in the exec
form of the callback, I was wondering if there is a way to reliably obtain
it from the sqlite3 *object (in this case: this ->Cx ) ;
this ->dbError = sqlite3_exec(
this ->Cx,
query,
lw_sqlite_callback,
this,
(char **) NULL
) ;
return( db_Error( this ) ) ;
where the callback is defined:
int lw_sqlite_callback(void* this, int n_Cols, char**vals, char**vars){
Db_t *p ;
int i = 0 ;
p = (Db_t *) this ;
if( !p ->Result ){
p ->Result = New( TList, n_Cols ) ;
}
for( i = 0 ; i < n_Cols ; i++ ){
at_Addstr( p ->Result, vars[i], vals[i] ) ;
}
return( SQLITE_OK ) ;
}
note that in the callback, this ->Cx constitutes the sqlite3 database
pointer.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
Robert S. Sciuk http://www.controlq.com 259 Simcoe St. S.
Control-Q Research tel: 905.576.8028 Oshawa, Ont.
[EMAIL PROTECTED] fax: 905.576.8386 Canada, L1H 4H3
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------