From dadb718b103d6675399547d3f6c12d0726f9537e Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Mon, 11 Mar 2002 10:25:57 +0000 Subject: Bug fixes for the 2002-03-08 change. 1) Put back the error message for SQLError(). 2) Change Disallow premature to handle the SELECTed result. 3) Put back the behavior of AUTUCOMMIT mode change. 4) Fix SQLColumns for ODBC3.0. 5) Improve the handling of variable bookmark in ODBC3.0. 6) Enable Recognize Unique Index Button. --- src/interfaces/odbc/bind.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/interfaces/odbc/bind.c') diff --git a/src/interfaces/odbc/bind.c b/src/interfaces/odbc/bind.c index 6ce32c7982..b7303c4785 100644 --- a/src/interfaces/odbc/bind.c +++ b/src/interfaces/odbc/bind.c @@ -199,12 +199,20 @@ PGAPI_BindCol( else { /* Make sure it is the bookmark data type */ - if (fCType != SQL_C_BOOKMARK) + if (fCType == SQL_C_BOOKMARK) + switch (fCType) { - stmt->errormsg = "Column 0 is not of type SQL_C_BOOKMARK"; - stmt->errornumber = STMT_PROGRAM_TYPE_OUT_OF_RANGE; - SC_log_error(func, "", stmt); - return SQL_ERROR; + case SQL_C_BOOKMARK: +#if (ODBCVER >= 0x0300) + case SQL_C_VARBOOKMARK: +#endif /* ODBCVER */ + break; + default: + stmt->errormsg = "Column 0 is not of type SQL_C_BOOKMARK"; +inolog("Column 0 is type %d not of type SQL_C_BOOKMARK", fCType); + stmt->errornumber = STMT_PROGRAM_TYPE_OUT_OF_RANGE; + SC_log_error(func, "", stmt); + return SQL_ERROR; } stmt->bookmark.buffer = rgbValue; -- cgit v1.2.1