diff options
author | Hiroshi Inoue <inoue@tpf.co.jp> | 2002-03-11 10:25:57 +0000 |
---|---|---|
committer | Hiroshi Inoue <inoue@tpf.co.jp> | 2002-03-11 10:25:57 +0000 |
commit | dadb718b103d6675399547d3f6c12d0726f9537e (patch) | |
tree | 52a79b9c8affb5d5c4b7591516d470367483f60a /src/interfaces/odbc/bind.c | |
parent | d0d3ab532509c11c6f21ce189ad1ba44437baa62 (diff) | |
download | postgresql-dadb718b103d6675399547d3f6c12d0726f9537e.tar.gz postgresql-dadb718b103d6675399547d3f6c12d0726f9537e.zip |
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.
Diffstat (limited to 'src/interfaces/odbc/bind.c')
-rw-r--r-- | src/interfaces/odbc/bind.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/interfaces/odbc/bind.c b/src/interfaces/odbc/bind.c index 6ce32c7982b..b7303c47859 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; |