X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/51e298bbbb23dc0311eee4f0dc36e62e4b229904..c687b303a5040da07009ea93504121aeec56682a:/samples/db/dbtest.cpp?ds=sidebyside diff --git a/samples/db/dbtest.cpp b/samples/db/dbtest.cpp index ef03c41498..8b91e280cd 100644 --- a/samples/db/dbtest.cpp +++ b/samples/db/dbtest.cpp @@ -616,6 +616,22 @@ void CheckSupportForAllDataTypes(wxDb *pDb) wxLogMessage(nativeDataTypeName); } #endif +#ifdef SQL_WVARCHAR + if (DataTypeSupported(pDb,SQL_WVARCHAR, &nativeDataTypeName)) + { + nativeDataTypeName = wxT("SQL_WVARCHAR (") + nativeDataTypeName; + nativeDataTypeName += wxT(")\n"); + wxLogMessage(nativeDataTypeName); + } +#endif +#ifdef SQL_WCHAR + if (DataTypeSupported(pDb,SQL_WCHAR, &nativeDataTypeName)) + { + nativeDataTypeName = wxT("SQL_WCHAR (") + nativeDataTypeName; + nativeDataTypeName += wxT(")\n"); + wxLogMessage(nativeDataTypeName); + } +#endif wxLogMessage(wxT("Done\n")); } // CheckSupportForAllDataTypes() @@ -1452,7 +1468,8 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event)) /* const wxString &orderBy */ wxT("NAME"), /* wxDb *pDb */ wxGetApp().READONLY_DB, /* const wxString &defDir */ wxGetApp().DbConnectInf->GetDefaultDir(), - /* bool distinctValues*/ true); + /* bool distinctValues*/ true, + wxEmptyString, 20); if (ListDB_Selection && wxStrlen(ListDB_Selection)) { @@ -1484,7 +1501,7 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event)) if (wxGetApp().Contact->GetDb()->Catalog(wxEmptyString, wxT("catalog.txt"))) wxMessageBox(wxT("The file 'catalog.txt' was created.")); else - wxMessageBox(wxT("Creation of the file 'catalog.txt' was failed.")); + wxMessageBox(wxT("Creation of the file 'catalog.txt' failed.")); return; } @@ -1707,7 +1724,8 @@ void CeditorDlg::OnSelectPict() if (file.IsOpened()) { - wxFileOffset iSize = file.Length(); + // assume not huge file in sample + long iSize = (long)file.Length(); if ((iSize > 0) && (iSize < MAX_PICTURE_SIZE)) { @@ -1721,7 +1739,7 @@ void CeditorDlg::OnSelectPict() wxMessageBox(wxT("Something bad happened while reading..."), wxT("BLOB Loading Error"), wxOK | wxICON_EXCLAMATION); wxString tStr; - tStr.Printf(wxT("%lu"),iSize); + tStr.Printf(wxT("%ld"),iSize); pPictSizeTxt->SetValue(tStr); } else