Issue Details (XML | Word | Printable)

Key: ODBC-146
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Potapchenko
Reporter: Jojakim Stahl
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
ODBC Driver

Paramter length value SQL_DATA_AT_EXEC is ignored when statement was first used with length value set to SQL_NULL_DATA

Created: 31/May/12 01:47 PM   Updated: 01/Jan/15 03:33 PM
Component/s: None
Affects Version/s: 2.0.1
Fix Version/s: 2.0.2

Environment: Windows 7, Firebird 2.5 x64

 Description  « Hide
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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jojakim Stahl added a comment - 31/May/12 01:55 PM - edited
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:\ 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() )
- {
- rebindParam( true );
- }
+ rebindParam( true );
  if ( listBindIn->GetCount() < nInputParam )

Alexander Potapchenko added a comment - 04/Aug/12 10:01 AM
Fixed in CVS