Added a param to ::Open() to allow the programmer to specify whether opening the table should check if table exists

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2001-04-10 10:43:51 +00:00
parent 04a429cb8a
commit 1454d4e659
3 changed files with 8 additions and 6 deletions

View File

@@ -694,7 +694,7 @@ bool wxDbTable::query(int queryType, bool forUpdate, bool distinct, const wxStri
/********** wxDbTable::Open() **********/
bool wxDbTable::Open(bool checkPrivileges)
bool wxDbTable::Open(bool checkPrivileges, bool checkTableExists)
{
if (!pDb)
return FALSE;
@@ -705,7 +705,7 @@ bool wxDbTable::Open(bool checkPrivileges)
s.Empty();
// Verify that the table exists in the database
if (!pDb->TableExists(tableName,/*pDb->GetUsername()*/NULL,tablePath))
if (checkTableExists && !pDb->TableExists(tableName,/*pDb->GetUsername()*/NULL,tablePath))
{
s = wxT("Table/view does not exist in the database");
if ( *(pDb->dbInf.accessibleTables) == wxT('Y'))