Fixed double deletion of a dialog in the effect of a failed connection to the datasource
Fixed call to TablePrivileges() in a commented out piece of code to use the correct parameters, in case someone uses it for an example git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -388,7 +388,7 @@ void DatabaseDemoFrame::CreateDataTable(bool recreate)
|
|||||||
wxEndBusyCursor();
|
wxEndBusyCursor();
|
||||||
|
|
||||||
delete Contact;
|
delete Contact;
|
||||||
Contact = NULL;
|
Contact = NULL;
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
wxMessageBox("Table and index(es) were successfully created.","Notice...",wxOK | wxICON_INFORMATION);
|
wxMessageBox("Table and index(es) were successfully created.","Notice...",wxOK | wxICON_INFORMATION);
|
||||||
@@ -405,7 +405,7 @@ void DatabaseDemoFrame::BuildEditorDialog()
|
|||||||
if (!pEditorDlg->initialized)
|
if (!pEditorDlg->initialized)
|
||||||
{
|
{
|
||||||
pEditorDlg->Close();
|
pEditorDlg->Close();
|
||||||
delete pEditorDlg;
|
pEditorDlg = NULL;
|
||||||
wxMessageBox("Unable to initialize the editor dialog for some reason","Error...",wxOK | wxICON_EXCLAMATION);
|
wxMessageBox("Unable to initialize the editor dialog for some reason","Error...",wxOK | wxICON_EXCLAMATION);
|
||||||
DemoFrame->Close();
|
DemoFrame->Close();
|
||||||
}
|
}
|
||||||
@@ -925,7 +925,7 @@ bool CeditorDlg::Initialize()
|
|||||||
// in the 2.4 release. This check will determine whether the open failing was due
|
// in the 2.4 release. This check will determine whether the open failing was due
|
||||||
// to the table not existing, or the users privileges being insufficient to
|
// to the table not existing, or the users privileges being insufficient to
|
||||||
// open the table.
|
// open the table.
|
||||||
if (!Contact->GetDb()->TablePrivileges(CONTACT_TABLE_NAME,"SELECT",Contact->GetDb()->GetUsername(),DbConnectInf.defaultDir))
|
if (!Contact->GetDb()->TablePrivileges(CONTACT_TABLE_NAME,"SELECT",Contact->GetDb()->GetUsername(),Contact->GetDb()->GetUsername(),DbConnectInf.defaultDir))
|
||||||
{
|
{
|
||||||
wxString tStr;
|
wxString tStr;
|
||||||
tStr.Printf("Unable to open the table '%s'.\n\n",CONTACT_TABLE_NAME);
|
tStr.Printf("Unable to open the table '%s'.\n\n",CONTACT_TABLE_NAME);
|
||||||
|
Reference in New Issue
Block a user