summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
aa324ea)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31172
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxString tStr;
tStr.Printf(wxT("Unable to open the table '%s'."), tableName.c_str());
{
wxString tStr;
tStr.Printf(wxT("Unable to open the table '%s'."), tableName.c_str());
- wxMessageBox(tStr, wxT("ODBC Error..."));
+ wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),lookup->GetDb(),__TFILE__,__LINE__),
+ wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
+
lookup->SetWhereClause(where);
if (!lookup->Query())
{
lookup->SetWhereClause(where);
if (!lookup->Query())
{
- wxMessageBox(wxT("ODBC error during Query()"), wxT("ODBC Error..."));
+ wxString tStr;
+ tStr = wxT("ODBC error during Query()\n\n");
+ wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),lookup->GetDb(),__TFILE__,__LINE__),
+ wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
+
// If displaying 2 columns, determine the maximum length of column1
int maxColLen;
// If displaying 2 columns, determine the maximum length of column1
int maxColLen;
maxColLen = col1Len = maxLenCol1; // user passed in max col length for column 1
else
{
maxColLen = col1Len = maxLenCol1; // user passed in max col length for column 1
else
{
+ // NOTE: Some databases (Firebird/Interbase) cannot handle the "fn" and "MAX()" functions
+
maxColLen = LOOKUP_COL_LEN;
if (wxStrlen(dispCol2))
{
maxColLen = LOOKUP_COL_LEN;
if (wxStrlen(dispCol2))
{
}
if (!lookup2->QueryBySqlStmt(q))
{
}
if (!lookup2->QueryBySqlStmt(q))
{
- wxMessageBox(wxT("ODBC error during QueryBySqlStmt()"),wxT("ODBC Error..."));
+ wxString tStr;
+ tStr = wxT("ODBC error during QueryBySqlStmt()\n\n");
+ wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),lookup2->GetDb(),__TFILE__,__LINE__),
+ wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
+
Close();
return;
}
if (lookup2->GetNext())
maxColLen = col1Len = wxAtoi(lookup2->lookupCol1);
else
Close();
return;
}
if (lookup2->GetNext())
maxColLen = col1Len = wxAtoi(lookup2->lookupCol1);
else
- wxMessageBox(wxT("ODBC error during GetNext()"),wxT("ODBC Error..."));
+ {
+ wxString tStr;
+ tStr = wxT("ODBC error during GetNext()\n\n");
+ wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),lookup2->GetDb(),__TFILE__,__LINE__),
+ wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
+ }
{
if (!lookup2->QueryBySqlStmt(selectStmt))
{
{
if (!lookup2->QueryBySqlStmt(selectStmt))
{
- wxMessageBox(wxT("ODBC error during QueryBySqlStmt()"),wxT("ODBC Error..."));
+ wxString tStr;
+ tStr = wxT("ODBC error during QueryBySqlStmt()\n\n");
+ wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),lookup2->GetDb(),__TFILE__,__LINE__),
+ wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
+
lookup2->SetWhereClause(where);
if (!lookup2->Query(false, distinctValues))
{
lookup2->SetWhereClause(where);
if (!lookup2->Query(false, distinctValues))
{
- wxMessageBox(wxT("ODBC error during Query()"),wxT("ODBC Error..."));
+ wxString tStr;
+ tStr = wxT("ODBC error during Query()\n\n");
+ wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),lookup2->GetDb(),__TFILE__,__LINE__),
+ wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
+