Thread View: borland.public.interbase.opensource
1 messages
1 total messages
Started by brian.azzopardi
Thu, 08 Jun 2006 21:15
isc_dsql_exec_immed2
Author: brian.azzopardi
Date: Thu, 08 Jun 2006 21:15
Date: Thu, 08 Jun 2006 21:15
27 lines
2071 bytes
2071 bytes
I had been having problems getting isc_dsql_exec_immed2() to work in Firebird 1.5.3. Unless the correct parameters and the XSQLDA struct is setup correctly isc_dsql_exec_immed2() will crash. With the below code I got it working: long tmpLong = 0; short flag = 0; out_data = (XSQLDA *) malloc( XSQLDA_LENGTH(1) ); out_data->version = SQLDA_VERSION1; out_data->sqln = out_data->sqld = 1; out_data->sqlvar[0].sqltype = SQL_LONG; out_data->sqlvar[0].sqlscale = 0; out_data->sqlvar[0].sqldata = (char *) &tmpLong; out_data->sqlvar[0].sqllen = sizeof( long ); out_data->sqlvar[0].sqlind = &flag; if( isc_dsql_exec_immed2(status, &m_dbhandle, &trans, 0, sqlstatement, SQL_DIALECT_CURRENT, NULL, out_data) ) /* handle error */ This post is just a heads-up for others who may be having a similar problem - AFAIK there is no bug in the implementation of the call, though returning an error message instead of crashing would have been nicer. Brian
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads