pEditorDlg = NULL;
pParamDlg = NULL;
+#if wxUSE_LOG
delete wxLog::SetActiveTarget(new wxLogStderr);
+#endif // wxUSE_LOG
} // DatabaseDemoFrame constructor
DatabaseDemoFrame::~DatabaseDemoFrame()
{
+#if wxUSE_LOG
delete wxLog::SetActiveTarget(NULL);
+#endif // wxUSE_LOG
} // DatabaseDemoFrame destructor
{
wxChar Dsn[SQL_MAX_DSN_LENGTH + 1];
wxChar DsDesc[255];
- wxStringList strList;
+ wxSortedArrayString strArr;
while (wxDbGetDataSource(wxGetApp().DbConnectInf->GetHenv(), Dsn,
SQL_MAX_DSN_LENGTH+1, DsDesc, 255))
- strList.Add(Dsn);
-
- strList.Sort();
- strList.Add(wxT(""));
+ {
+ strArr.Add(Dsn);
+ }
- wxString current;
- for (wxStringList::Node *node = strList.GetFirst(); node; node = node->GetNext() )
+ for (size_t i=0; i < strArr.GetCount(); i++ )
{
- current = node->GetData();
- if(!current.IsEmpty())
- pParamODBCSourceList->Append(current.c_str());
+ pParamODBCSourceList->Append(strArr[i].c_str());
}
} // CparameterDlg::FillDataSourceList()