summaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/odbcapi.c
diff options
context:
space:
mode:
authorHiroshi Inoue2001-09-07 06:02:24 +0000
committerHiroshi Inoue2001-09-07 06:02:24 +0000
commit377d131b6c351e0db1bed9cc393cdba3c1eaea56 (patch)
tree035e891fc630d0feac247d298e0d468710105d96 /src/interfaces/odbc/odbcapi.c
parent3bdd67a20394288761528cf8d5bd77d629cde500 (diff)
1) Most driver options could be set per DSN.
2) Keep FE/BE protocol more precisely. 3) Improve procedure calls. 4) A trial to avoid PREMATURE execution(#ifdef'd now). Hiroshi Inoue
Diffstat (limited to 'src/interfaces/odbc/odbcapi.c')
-rw-r--r--src/interfaces/odbc/odbcapi.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/interfaces/odbc/odbcapi.c b/src/interfaces/odbc/odbcapi.c
index 60205c011b6..dbb3142401f 100644
--- a/src/interfaces/odbc/odbcapi.c
+++ b/src/interfaces/odbc/odbcapi.c
@@ -254,7 +254,7 @@ RETCODE SQL_API SQLGetData(HSTMT StatementHandle,
RETCODE SQL_API SQLGetFunctions(HDBC ConnectionHandle,
SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported)
{
- mylog("[SQLGetFunctions");
+ mylog("[SQLGetFunctions]");
#if (ODBCVER >= 0x3000)
if (FunctionId == SQL_API_ODBC3_ALL_FUNCTIONS)
return PGAPI_GetFunctions30(ConnectionHandle, FunctionId, Supported);
@@ -270,10 +270,12 @@ RETCODE SQL_API SQLGetInfo(HDBC ConnectionHandle,
mylog("[SQLGetInfo(30)]");
if ((ret = PGAPI_GetInfo(ConnectionHandle, InfoType, InfoValue,
BufferLength, StringLength)) == SQL_ERROR)
- return PGAPI_GetInfo30(ConnectionHandle, InfoType, InfoValue,
- BufferLength, StringLength);
- else
- return ret;
+ {
+ if (((ConnectionClass *) ConnectionHandle)->driver_version >= 0x3000)
+ return PGAPI_GetInfo30(ConnectionHandle, InfoType, InfoValue,
+ BufferLength, StringLength);
+ }
+ return ret;
#else
mylog("[SQLGetInfo]");
return PGAPI_GetInfo(ConnectionHandle, InfoType, InfoValue,