From f6a9f9ad2896fe3666111dabf7fad196108b219e Mon Sep 17 00:00:00 2001 From: George Tasker Date: Mon, 14 Mar 2005 14:41:12 +0000 Subject: [PATCH] Added support (barely tested) for MaxDB from MySQL Added dbmsFutureX to the database enumerations to allow for adding support for new databases between releases of wxWidgets git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/db.cpp | 9 ++++++--- src/common/dbtable.cpp | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/db.cpp b/src/common/db.cpp index a73b422186..ee2a47b16a 100644 --- a/src/common/db.cpp +++ b/src/common/db.cpp @@ -576,9 +576,10 @@ const wxChar *wxDb::convertUserID(const wxChar *userID, wxString &UserID) || Dbms() == dbmsXBASE_SEQUITER ) UserID.Empty(); - // Oracle user names may only be in uppercase, so force - // the name to uppercase - if (Dbms() == dbmsORACLE) + // Some databases require user names to be specified in uppercase, + // so force the name to uppercase + if ((Dbms() == dbmsORACLE) || + (Dbms() == dbmsMAXDB)) UserID = UserID.Upper(); return UserID.c_str(); @@ -3949,6 +3950,8 @@ wxDBMS wxDb::Dbms(void) return((wxDBMS)(dbmsType = dbmsXBASE_SEQUITER)); if (!wxStricmp(baseName,wxT("MySQL"))) return((wxDBMS)(dbmsType = dbmsMY_SQL)); + if (!wxStricmp(baseName,wxT("MaxDB"))) + return((wxDBMS)(dbmsType = dbmsMAXDB)); baseName[3] = 0; if (!wxStricmp(baseName,wxT("DB2"))) diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index 2506131b06..d5f848518b 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -1853,6 +1853,7 @@ bool wxDbTable::DropIndex(const wxString &indexName) (pDb->Dbms() == dbmsSYBASE_ASE && !wxStrcmp(pDb->sqlState,wxT("37000"))) || (pDb->Dbms() == dbmsMS_SQL_SERVER && !wxStrcmp(pDb->sqlState,wxT("S1000"))) || (pDb->Dbms() == dbmsINTERBASE && !wxStrcmp(pDb->sqlState,wxT("S1000"))) || + (pDb->Dbms() == dbmsMAXDB && !wxStrcmp(pDb->sqlState,wxT("S1000"))) || (pDb->Dbms() == dbmsFIREBIRD && !wxStrcmp(pDb->sqlState,wxT("HY000"))) || (pDb->Dbms() == dbmsSYBASE_ASE && !wxStrcmp(pDb->sqlState,wxT("S0002"))) || // Base table not found (pDb->Dbms() == dbmsMY_SQL && !wxStrcmp(pDb->sqlState,wxT("42S12"))) || // tested by Christopher Ludwik Marino-Cebulski using v3.23.21beta -- 2.45.2