diff options
author | Hiroshi Inoue <inoue@tpf.co.jp> | 2002-03-08 08:52:55 +0000 |
---|---|---|
committer | Hiroshi Inoue <inoue@tpf.co.jp> | 2002-03-08 08:52:55 +0000 |
commit | 4b47467a6b0d86162dd8814b8ab923aba982fb34 (patch) | |
tree | 85fea3bf0475716f35d440468eda620769081bac /src/interfaces/odbc/odbcapi.c | |
parent | 21f8aa396fa833ac95cff4e85c5281fd24fd1632 (diff) |
1) Implement SQLParamOptions().
2) Handle Multiple results and implement SQLMoreResult().
3) Improve multibyte handling thanks to Eiji Tokuya.
4) Add new options.
LF <-> CR/LF converion.
TRUE is -1 (for VB).
5) Introduce unicode(UCS-2) support.
6) Reduce the length of connection strings.
7) Improve SQLError, SQLGetDiagRec(ODBC 3.0).
8) Implement SQLTablePrivileges().
9) Miscellaneous changes for ODBC 3.0 support.
Diffstat (limited to 'src/interfaces/odbc/odbcapi.c')
-rw-r--r-- | src/interfaces/odbc/odbcapi.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/interfaces/odbc/odbcapi.c b/src/interfaces/odbc/odbcapi.c index 0527b21c38b..cbb31dad0a7 100644 --- a/src/interfaces/odbc/odbcapi.c +++ b/src/interfaces/odbc/odbcapi.c @@ -174,7 +174,8 @@ SQLError(HENV EnvironmentHandle, { mylog("[SQLError]"); return PGAPI_Error(EnvironmentHandle, ConnectionHandle, StatementHandle, - Sqlstate, NativeError, MessageText, BufferLength, TextLength); + Sqlstate, NativeError, MessageText, BufferLength, + TextLength); } RETCODE SQL_API @@ -281,23 +282,31 @@ SQLGetInfo(HDBC ConnectionHandle, SQLUSMALLINT InfoType, PTR InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { -#if (ODBCVER >= 0x0300) RETCODE ret; + ConnectionClass *conn = (ConnectionClass *) ConnectionHandle; + CC_clear_error(conn); +#if (ODBCVER >= 0x0300) mylog("[SQLGetInfo(30)]"); if ((ret = PGAPI_GetInfo(ConnectionHandle, InfoType, InfoValue, BufferLength, StringLength)) == SQL_ERROR) { if (((ConnectionClass *) ConnectionHandle)->driver_version >= 0x0300) - return PGAPI_GetInfo30(ConnectionHandle, InfoType, InfoValue, + { + CC_clear_error(conn); + ret = PGAPI_GetInfo30(ConnectionHandle, InfoType, InfoValue, BufferLength, StringLength); + } } - return ret; + if (SQL_ERROR == ret) + CC_log_error("SQLGetInfo30", "", conn); #else mylog("[SQLGetInfo]"); - return PGAPI_GetInfo(ConnectionHandle, InfoType, InfoValue, - BufferLength, StringLength); + if (ret = PGAPI_GetInfo(ConnectionHandle, InfoType, InfoValue, + BufferLength, StringLength), SQL_ERROR == ret) + CC_log_error("PGAPI_GetInfo", "", conn); #endif + return ret; } RETCODE SQL_API @@ -638,7 +647,7 @@ SQLTablePrivileges( { mylog("[SQLTablePrivileges]"); return PGAPI_TablePrivileges(hstmt, szCatalogName, cbCatalogName, - szSchemaName, cbSchemaName, szTableName, cbTableName); + szSchemaName, cbSchemaName, szTableName, cbTableName, 0); } RETCODE SQL_API |