diff options
author | Hiroshi Inoue | 2001-04-23 01:00:49 +0000 |
---|---|---|
committer | Hiroshi Inoue | 2001-04-23 01:00:49 +0000 |
commit | cc6bdb3e4898cf5411005871e9dad7a341a07f20 (patch) | |
tree | 6923039c5f5038bde728892a3850685caa402a1f /src/interfaces/odbc/bind.c | |
parent | 0e29d760f4884d6cc194cf6d95605417e825a145 (diff) |
A patch to fix the following bugs.
1) [ODBC] Psqlodbc and Centura: here it is a patch
posted by Matteo Cavalleli
2) [ODBC] pgsqODBC binding parameters II
posted by Ludek Finstrle
3) Invalid Page Fault in PSQLODBC.DLL
personal mail from Johann Zuschlag
Hiroki Kataoka [email protected]
Diffstat (limited to 'src/interfaces/odbc/bind.c')
-rw-r--r-- | src/interfaces/odbc/bind.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/interfaces/odbc/bind.c b/src/interfaces/odbc/bind.c index 5bade8b3956..c70f78d4fb7 100644 --- a/src/interfaces/odbc/bind.c +++ b/src/interfaces/odbc/bind.c @@ -143,11 +143,16 @@ SQLBindParameter( } /* Data at exec macro only valid for C char/binary data */ - if ((fSqlType == SQL_LONGVARBINARY || fSqlType == SQL_LONGVARCHAR) && pcbValue && *pcbValue <= SQL_LEN_DATA_AT_EXEC_OFFSET) + if (pcbValue && (*pcbValue == SQL_DATA_AT_EXEC || + *pcbValue <= SQL_LEN_DATA_AT_EXEC_OFFSET)) stmt->parameters[ipar].data_at_exec = TRUE; else stmt->parameters[ipar].data_at_exec = FALSE; + /* Clear premature result */ + if (stmt->status == STMT_PREMATURE) + SC_recycle_statement(stmt); + mylog("SQLBindParamater: ipar=%d, paramType=%d, fCType=%d, fSqlType=%d, cbColDef=%d, ibScale=%d, rgbValue=%d, *pcbValue = %d, data_at_exec = %d\n", ipar, fParamType, fCType, fSqlType, cbColDef, ibScale, rgbValue, pcbValue ? *pcbValue : -777, stmt->parameters[ipar].data_at_exec); return SQL_SUCCESS; |