freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: wigyxz-freetds AT yahoo.com
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: [freetds] data-at-execute param number error
- Date: Wed, 22 Sep 2010 08:56:49 -0700 (PDT)
Hi all,
I"ve been trying to execute some ODBC code to invoke a stored procedure
where with one parameter, SQLBindParameter() is used to send the
parameter data in a data-at-execute manner. I believe initially had
thought this might be necessary as the parameter is a potentially
lengthy text string.
Anyhow, after I call SQLExecute(), I'm getting an error when I call
SQLParamData() when I am trying to send the parameter data.
What I'm seeing down in the driver code is that in prepare_query.c
the call to prepared_rpc() is returning SQL_ERROR in this part of the
code:
...
case '?':
/* find binded parameter */
if (stmt->param_num > stmt->apd->header.sql_desc_count
|| stmt->param_num > stmt->ipd->header.sql_desc_count) {
tds_free_param_result(temp_params);
/* TODO set error */
return SQL_ERROR;
}
In my case, stmt->param_num is +1 greater than both the apd and ipd
header.sql_desc_count. My stored procedure has 3 parameters, but
param_num has been incremented to 4 at this point hence the error.
I've seen some comments in the archives that some data-at-execute
functionality may be lacking, but perhaps my code is just wrong.
Some insights would be much appreciated. I can post a simplified
version of my call if that helps.
In any case, I seem to be able to provide my long strings as
parameters in an immediate style rather than data-at-exec so perhaps
I don't need this anyway.
thanks.
-
[freetds] Fwd: Re: Help connecting with tds to MSSQL 2008 - problem found,
Gal Rubinstein, 09/21/2010
- Re: [freetds] Fwd: Re: Help connecting with tds to MSSQL 2008 - problem found, Frediano Ziglio, 09/21/2010
- Re: [freetds] Fwd: Re: Help connecting with tds to MSSQL 2008 - problem found, jklowden, 09/21/2010
- Re: [freetds] Fwd: Re: Help connecting with tds to MSSQL 2008 - problem found, Paul Thurston, 09/21/2010
- Re: [freetds] Fwd: Re: Help connecting with tds to MSSQL 2008 - problem found, Paul Thurston, 09/21/2010
-
Re: [freetds] Help connecting with tds to MSSQL 2008 - solution found,
Gal Rubinstein, 09/21/2010
-
Re: [freetds] Help connecting with tds to MSSQL 2008 - solution found,
Paul Thurston, 09/21/2010
- Re: [freetds] Help connecting with tds to MSSQL 2008 - solution found, jklowden, 09/21/2010
- [freetds] data-at-execute param number error, wigyxz-freetds, 09/22/2010
-
Re: [freetds] Help connecting with tds to MSSQL 2008 - solution found,
Paul Thurston, 09/21/2010
Archive powered by MHonArc 2.6.24.