[fdo-commits] r722 -
branches/3.2.x/Providers/GenericRdbms/Src/ODBCDriver
svn_fdo at osgeo.org
svn_fdo at osgeo.org
Wed Jan 31 18:51:44 EST 2007
Author: gavincramer
Date: 2007-01-31 18:51:42 -0500 (Wed, 31 Jan 2007)
New Revision: 722
Modified:
branches/3.2.x/Providers/GenericRdbms/Src/ODBCDriver/users_.c
Log:
ODBC: Connect to Access on Vista
Modified: branches/3.2.x/Providers/GenericRdbms/Src/ODBCDriver/users_.c
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/ODBCDriver/users_.c 2007-01-30 23:32:50 UTC (rev 721)
+++ branches/3.2.x/Providers/GenericRdbms/Src/ODBCDriver/users_.c 2007-01-31 23:51:42 UTC (rev 722)
@@ -64,6 +64,8 @@
int rdbi_status = RDBI_GENERIC_ERROR;
int target_set;
SQLUINTEGER schemaUsages = 0;
+ int schemaUsagesSupported = TRUE;
+ short _odbcValue = SQL_ERROR;
// vectors can be used as SQLCHAR
wchar_t schemaToGet[10];
SQLWCHAR szSchemaBuf[ODBCDR_MAX_BUFF_SIZE];
@@ -96,14 +98,15 @@
_check_status;
if (context->odbcdr_UseUnicode){
- ODBCDR_ODBC_ERR( SQLGetInfoW(connData->hDbc, SQL_SCHEMA_USAGE, (SQLPOINTER)&schemaUsages,
- 0, NULL),SQL_HANDLE_DESC, connData->hDbc, "SQLGetInfo", "Fetching schemas" );
+ _odbcValue = SQLGetInfoW(connData->hDbc, SQL_SCHEMA_USAGE, (SQLPOINTER)&schemaUsages, 0, NULL);
}else{
- ODBCDR_ODBC_ERR( SQLGetInfo(connData->hDbc, SQL_SCHEMA_USAGE, (SQLPOINTER)&schemaUsages,
- 0, NULL),SQL_HANDLE_DESC, connData->hDbc, "SQLGetInfo", "Fetching schemas" );
+ _odbcValue = SQLGetInfo(connData->hDbc, SQL_SCHEMA_USAGE, (SQLPOINTER)&schemaUsages, 0, NULL);
}
- if (schemaUsages & SQL_SU_DML_STATEMENTS)
+ if (_odbcValue != ODBCDR_SUCCESS)
+ schemaUsagesSupported = FALSE;
+
+ if (schemaUsagesSupported && (schemaUsages & SQL_SU_DML_STATEMENTS))
{
c = connData->users;
More information about the fdo-commits
mailing list