Adding support for OpenLink driver on MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -95,6 +95,7 @@
|
|||||||
|
|
||||||
WXDLLEXPORT_DATA(wxDbList*) PtrBegDbList = 0;
|
WXDLLEXPORT_DATA(wxDbList*) PtrBegDbList = 0;
|
||||||
|
|
||||||
|
|
||||||
char const *SQL_LOG_FILENAME = "sqllog.txt";
|
char const *SQL_LOG_FILENAME = "sqllog.txt";
|
||||||
char const *SQL_CATALOG_FILENAME = "catalog.txt";
|
char const *SQL_CATALOG_FILENAME = "catalog.txt";
|
||||||
|
|
||||||
@@ -839,10 +840,11 @@ bool wxDb::getDataTypeInfo(SWORD fSqlType, wxDbSqlTypeInfo &structSQLTypeInfo)
|
|||||||
if (!wxStrcmp(structSQLTypeInfo.TypeName, "varchar")) wxStrcpy(structSQLTypeInfo.TypeName, "char");
|
if (!wxStrcmp(structSQLTypeInfo.TypeName, "varchar")) wxStrcpy(structSQLTypeInfo.TypeName, "char");
|
||||||
}
|
}
|
||||||
|
|
||||||
// BJO 20000427 : OpenLink driver (at least for unix)
|
// BJO 20000427 : OpenLink driver
|
||||||
#ifdef _IODBC_
|
if (!wxStrncmp(dbInf.driverName, "oplodbc", 7) ||
|
||||||
|
!wxStrncmp(dbInf.driverName, "OLOD", 4))
|
||||||
if (!wxStrcmp(structSQLTypeInfo.TypeName, "double precision")) wxStrcpy(structSQLTypeInfo.TypeName, "real");
|
if (!wxStrcmp(structSQLTypeInfo.TypeName, "double precision")) wxStrcpy(structSQLTypeInfo.TypeName, "real");
|
||||||
#endif
|
|
||||||
|
|
||||||
if (SQLGetData(hstmt, 3, SQL_C_LONG, (UCHAR*) &structSQLTypeInfo.Precision, 0, &cbRet) != SQL_SUCCESS)
|
if (SQLGetData(hstmt, 3, SQL_C_LONG, (UCHAR*) &structSQLTypeInfo.Precision, 0, &cbRet) != SQL_SUCCESS)
|
||||||
return(DispAllErrors(henv, hdbc, hstmt));
|
return(DispAllErrors(henv, hdbc, hstmt));
|
||||||
@@ -2488,10 +2490,14 @@ wxDBMS wxDb::Dbms(void)
|
|||||||
if (!wxStricmp(dbInf.dbmsName,"Adaptive Server Anywhere"))
|
if (!wxStricmp(dbInf.dbmsName,"Adaptive Server Anywhere"))
|
||||||
return(dbmsSYBASE_ASA);
|
return(dbmsSYBASE_ASA);
|
||||||
|
|
||||||
// BJO 20000427 : The "SQL Server" string is also returned by SQLServer when connected trough an OpenLink driver.
|
// BJO 20000427 : The "SQL Server" string is also returned by SQLServer when
|
||||||
|
// connected trhough an OpenLink driver.
|
||||||
// Is it also returned by Sybase?
|
// Is it also returned by Sybase?
|
||||||
|
// OpenLink driver name is OLOD3032.DLL for msw and oplodbc.so for unix
|
||||||
if (!wxStricmp(dbInf.dbmsName,"SQL Server"))
|
if (!wxStricmp(dbInf.dbmsName,"SQL Server"))
|
||||||
if (!wxStricmp(dbInf.driverName, "oplodbc.so")) return dbmsMS_SQL_SERVER; else return dbmsSYBASE_ASE;
|
if (!wxStrncmp(dbInf.driverName, "oplodbc", 7) ||
|
||||||
|
!wxStrncmp(dbInf.driverName, "OLOD", 4))
|
||||||
|
return dbmsMS_SQL_SERVER; else return dbmsSYBASE_ASE;
|
||||||
|
|
||||||
|
|
||||||
if (!wxStricmp(dbInf.dbmsName,"Microsoft SQL Server"))
|
if (!wxStricmp(dbInf.dbmsName,"Microsoft SQL Server"))
|
||||||
|
Reference in New Issue
Block a user