Article View: borland.public.interbase.opensource
Article #23isc_dsql_exec_immed2
From: 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
Technical Details
Message-ID:
<1149801357.240015.58460@i40g2000cwc.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i40g2000cwc.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 106772,1a4b10e01878cae2,start X-Google-Attributes: gid106772,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i40g2000cwc.googlegroups.com!not-for-mail From: brian.azzopardi@gmail.com Newsgroups: borland.public.interbase.opensource Subject: isc_dsql_exec_immed2 Date: 8 Jun 2006 14:15:57 -0700 Organization: http://groups.google.com Lines: 28 Message-ID: <1149801357.240015.58460@i40g2000cwc.googlegroups.com> NNTP-Posting-Host: 195.158.119.216 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1149801362 21162 127.0.0.1 (8 Jun 2006 21:16:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 8 Jun 2006 21:16:02 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: i40g2000cwc.googlegroups.com; posting-host=195.158.119.216; posting-account=C54ouQ0AAAB0H5g8nIxsOGaZK_MmYBYH