Skip to content

Commit

Permalink
Fixed invalid parameters binding
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Chapligin committed Feb 20, 2013
1 parent 40f7d29 commit 6bc5053
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/backends/db2/soci-db2.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ struct SOCI_DB2_DECL db2_vector_into_type_backend : details::vector_into_type_ba
struct SOCI_DB2_DECL db2_standard_use_type_backend : details::standard_use_type_backend struct SOCI_DB2_DECL db2_standard_use_type_backend : details::standard_use_type_backend
{ {
db2_standard_use_type_backend(db2_statement_backend &st) db2_standard_use_type_backend(db2_statement_backend &st)
: statement_(st),buf(NULL) : statement_(st),buf(NULL),indptr(NULL)
{} {}


void bind_by_pos(int& position, void* data, details::exchange_type type, bool readOnly); void bind_by_pos(int& position, void* data, details::exchange_type type, bool readOnly);
Expand Down
2 changes: 1 addition & 1 deletion src/backends/db2/standard-use-type.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void db2_standard_use_type_backend::bind_helper(int &position, void *data, detai
SQLRETURN cliRC = SQLBindParameter(statement_.hStmt, SQLRETURN cliRC = SQLBindParameter(statement_.hStmt,
static_cast<SQLUSMALLINT>(position++), static_cast<SQLUSMALLINT>(position++),
SQL_PARAM_INPUT, SQL_PARAM_INPUT,
cType, sqlType, size, 0, data, 0, &indptr); cType, sqlType, size, 0, data, size, &indptr);


if (cliRC != SQL_SUCCESS) if (cliRC != SQL_SUCCESS)
{ {
Expand Down

0 comments on commit 6bc5053

Please sign in to comment.