Paramter length value SQL_DATA_AT_EXEC is ignored when statement was first used with length value set to SQL_NULL_DATA [ODBC146]
firebird-automations opened this issue · 4 comments
Submitted by: Jojakim Stahl (jstahl)
SQLBindParameter sets a pointer to a length indicator for a column. When a statement is prepared and first executed with the indicator set to SQL_NULL_DATA, a change to SQL_DATA_AT_EXEC for its second execution seems to have no effect. SQLParamData never returns SQL_NEED_DATA for this parameter.
Commented by: Jojakim Stahl (jstahl)
The problem was, that the data_at_exec flag for the parameter was set only when first executed/prepared. I fixed this in the following way:
--- e:\http://OdbcFb.org/OdbcStatement.cpp 2012-03-01 11:33:55.000000000 +0100
+++ ./OdbcStatement.cpp 2012-05-24 14:14:04.793788400 +0200
@@ -2730,10 +2730,8 @@
if(parameterNeedData == 0)
{
if ( !implementationParamDescriptor->isDefined() )
- {
implementationParamDescriptor->setDefined(true);
- rebindParam( true );
- }
+ rebindParam( true );
if \( listBindIn\-\>GetCount\(\) < nInputParam \)
\{
Commented by: @alexpotapchenko
Fixed in CVS
Modified by: @alexpotapchenko
status: Open [ 1 ] => Resolved [ 5 ]
resolution: Fixed [ 1 ]
Fix Version: 2.0.2 [ 10465 ]
Modified by: @alexpotapchenko
status: Resolved [ 5 ] => Closed [ 6 ]