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