Applied patch [ 566816 ] adds xBase type for Sequiter's SQL/ODBC

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2002-08-16 12:43:07 +00:00
parent 8f8edad80e
commit 9f4de2dcf8
3 changed files with 13 additions and 4 deletions

View File

@ -452,7 +452,8 @@ enum wxDBMS
dbmsVIRTUOSO,
dbmsDB2,
dbmsINTERBASE,
dbmsPERVASIVE_SQL
dbmsPERVASIVE_SQL,
dbmsXBASE_SEQUITER
};

View File

@ -562,7 +562,8 @@ const wxChar *wxDb::convertUserID(const wxChar *userID, wxString &UserID)
UserID.Empty();
// dBase does not use user names, and some drivers fail if you try to pass one
if (Dbms() == dbmsDBASE)
if ( Dbms() == dbmsDBASE
|| Dbms() == dbmsXBASE_SEQUITER )
UserID.Empty();
// Oracle user names may only be in uppercase, so force
@ -3498,6 +3499,9 @@ wxDBMS wxDb::Dbms(void)
if (!wxStricmp(baseName,wxT("DBASE")))
return((wxDBMS)(dbmsType = dbmsDBASE));
if (!wxStricmp(baseName,wxT("xBase")))
return((wxDBMS)(dbmsType = dbmsXBASE_SEQUITER));
if (!wxStricmp(baseName,wxT("MySQL")))
return((wxDBMS)(dbmsType = dbmsMY_SQL));
@ -3565,6 +3569,7 @@ bool wxDb::ModifyColumn(const wxString &tableName, const wxString &columnName,
case dbmsPOSTGRES :
case dbmsACCESS :
case dbmsDBASE :
case dbmsXBASE_SEQUITER :
default :
alterSlashModify = "MODIFY";
break;

View File

@ -1417,7 +1417,9 @@ bool wxDbTable::CreateTable(bool attemptDrop)
break;
}
}
if (j && pDb->Dbms() != dbmsDBASE) // Found a keyfield
if (j && (pDb->Dbms() != dbmsDBASE)
&& (pDb->Dbms() != dbmsXBASE_SEQUITER)
) // Found a keyfield
{
switch (pDb->Dbms())
{
@ -1711,7 +1713,8 @@ bool wxDbTable::DropIndex(const wxString &idxName)
pDb->SQLTableName(idxName.c_str()).c_str(),
pDb->SQLTableName(tableName.c_str()).c_str());
else if ((pDb->Dbms() == dbmsMS_SQL_SERVER) ||
(pDb->Dbms() == dbmsSYBASE_ASE))
(pDb->Dbms() == dbmsSYBASE_ASE) ||
(pDb->Dbms() == dbmsXBASE_SEQUITER))
sqlStmt.Printf(wxT("DROP INDEX %s.%s"),
pDb->SQLTableName(tableName.c_str()).c_str(),
pDb->SQLTableName(idxName.c_str()).c_str());