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))
{
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
if (!lookup->Open())
{
wxString tStr;
- tStr.Printf(wxT("Unable to open the table '%s'."), tableName);
+ tStr.Printf(wxT("Unable to open the table '%s'."), tableName.c_str());
wxMessageBox(tStr, wxT("ODBC Error..."));
Close();
return;
// in the lookup window.
//
ClookUpDlg::ClookUpDlg(wxWindow *parent, const wxString &windowTitle, const wxString &tableName,
- const wxString &dispCol1, const wxString &dispCol2,
+ const wxString &dispCol1, const wxString &dispCol2,
const wxString &where, const wxString &orderBy,
wxDb *pDb, const wxString &defDir, bool distinctValues,
const wxString &selectStmt, int maxLenCol1, bool allowOk)
if (!lookup2->Open())
{
wxString tStr;
- tStr.Printf(wxT("Unable to open the table '%s'."),tableName);
+ tStr.Printf(wxT("Unable to open the table '%s'."),tableName.c_str());
tStr += GetExtendedDBErrorMsg2(pDb,__TFILE__,__LINE__);
wxMessageBox(tStr,wxT("ODBC Error..."));
Close();