Add support for Virtuoso

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bart A.M. Jourquin
2000-04-28 13:45:52 +00:00
parent 89ee194efd
commit 9de1150e2d
3 changed files with 25 additions and 12 deletions

View File

@@ -341,7 +341,8 @@ enum wxDBMS
dbmsPOSTGRES,
dbmsACCESS,
dbmsDBASE,
dbmsINFORMIX
dbmsINFORMIX,
dbmsVIRTUOSO
};

View File

@@ -68,6 +68,7 @@
#include "wx/wxchar.h"
#endif
#if wxMAJOR_VERSION == 1
# if defined(wx_msw) || defined(wx_x)
# ifdef WX_PRECOMP
@@ -1865,7 +1866,13 @@ wxDbColInf *wxDb::GetColumns(char *tableName, int *numCols, const char *userID)
colInf[colNo].FkCol = 0; // Foreign key column 0=No; 1= First Key, 2 = Second Key etc.
colInf[colNo].FkTableName[0] = 0; // Foreign key table name
// BJO 20000428 : Virtuoso returns type names with upper cases!
if (Dbms() == dbmsVIRTUOSO)
{
wxString s = colInf[colNo].typeName;
s = s.MakeLower();
wxStrcmp(colInf[colNo].typeName, s.c_str());
}
// Determine the wxDb data type that is used to represent the native data type of this data source
colInf[colNo].dbDataType = 0;
@@ -2486,13 +2493,17 @@ wxDBMS wxDb::Dbms(void)
wxChar baseName[25+1];
wxStrncpy(baseName,dbInf.dbmsName,25);
// BJO 20000428 : add support for Virtuoso
if (!wxStricmp(dbInf.dbmsName,"OpenLink Virtuoso VDBMS"))
return(dbmsVIRTUOSO);
if (!wxStricmp(dbInf.dbmsName,"Adaptive Server Anywhere"))
return(dbmsSYBASE_ASA);
// BJO 20000427 : The "SQL Server" string is also returned by SQLServer when
// connected trhough an OpenLink driver.
// Is it also returned by Sybase?
// connected through an OpenLink driver.
// Is it also returned by Sybase Adapatitve server?
// OpenLink driver name is OLOD3032.DLL for msw and oplodbc.so for unix
if (!wxStricmp(dbInf.dbmsName,"SQL Server"))
if (!wxStrncmp(dbInf.driverName, "oplodbc", 7) ||

View File

@@ -44,6 +44,7 @@
#include "wx/ioswrap.h"
#endif
#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__