//----------------------------------------------------------------------------------------
//-- Some Global Vars for all Files (extern in ?.h needed) -------------------------------
// Global structure for holding ODBC connection information
-struct DbStuff DbConnectInf;
+wxDbConnectInf DbConnectInf;
//----------------------------------------------------------------------------------------
wxConfigBase *p_ProgramCfg; // All Config and Path information
wxLogTextCtrl *p_LogBook; // All Log messages
// ----------------------------------------------------------
// -E-> The Tree Controls take to long to close : Why ??
// ----------------------------------------------------------
- // wxMessageBox("-I-> end Doc");
+ delete ft_Doc;
+ ft_Doc = NULL;
p_TabArea->Show(FALSE); // Deactivate the Window
p_PageArea->Show(FALSE); // Deactivate the Window
p_PgmCtrl = NULL;
wxBitmap *p_FolderClose = new wxBitmap("PgmCtrl"); //, wxBITMAP_TYPE_BMP_RESOURCE); // BJO20000115
//---------------------------------------------------------------------------------------
p_TabArea->AddTab(p_PgmCtrl,"PgmCtrl",p_FolderClose);
+ delete p_FolderClose; // Memory leak
+ p_FolderClose = NULL;
//---------------------------------------------------------------------------------------
// now create "output" window
//---------------------------------------------------------------------------------------
p_Splitter->Initialize(p_TabArea);
p_Splitter->SplitHorizontally(p_TabArea,p_PageArea,Sash);
//---------------------------------------------------------------------------------------
- if (!OnInitODBC())
- return FALSE;
+ // if (!OnInitODBC())
+ // return FALSE;
+ OnInitODBC();
//---------------------------------------------------------------------------------------
Temp0.Printf(_("-I-> MainDoc::OnInitView() - End - %d DSN's found"),i_DSN);
p_MainFrame->SetStatusText(Temp0, 0);
// The key will be removed after sorting
wxString KeyString;
//---------------------------------------------------------------------------------------
- while(GetDataSource(DbConnectInf.Henv, Dsn, sizeof(Dsn), DsDesc, sizeof(DsDesc)))
+ while(wxDbGetDataSource(DbConnectInf.Henv, Dsn, sizeof(Dsn), DsDesc, sizeof(DsDesc)))
{
i_DSN++; // How many Dsn have we ?
KeyString.Printf("%s%c%s",Dsn, sep, DsDesc);
(db_Br+i)->pDoc = this;
(db_Br+i)->i_Which = i;
}
- if (SQLFreeEnv(&DbConnectInf.Henv) != SQL_SUCCESS) // BJO20000125
+ if (SQLFreeEnv(DbConnectInf.Henv) != SQL_SUCCESS) // BJO20000125 / MJ10777.20000309 : no &
{
// Error freeing environment handle
}