Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paramter length value SQL_DATA_AT_EXEC is ignored when statement was first used with length value set to SQL_NULL_DATA [ODBC146] #143

Closed
firebird-automations opened this issue May 31, 2012 · 4 comments

Comments

@firebird-automations
Copy link

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.

Commits: e096377 193e258

@firebird-automations
Copy link
Author

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 \)
		\{

@firebird-automations
Copy link
Author

Commented by: @alexpotapchenko

Fixed in CVS

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.0.2 [ 10465 ]

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants