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:
@@ -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'))
|
||||
|
Reference in New Issue
Block a user