X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5ffecfc985136771bb521074c0f46a07894e62e..260460ae06e11201d161eb6d1b09ba859900a4bc:/demos/dbbrowse/browsedb.cpp diff --git a/demos/dbbrowse/browsedb.cpp b/demos/dbbrowse/browsedb.cpp index 3ee7463cfc..5a659d131e 100644 --- a/demos/dbbrowse/browsedb.cpp +++ b/demos/dbbrowse/browsedb.cpp @@ -1,41 +1,41 @@ -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- // Name: BrowserDB.h,cpp -// Purpose: a wxDB; +// Purpose: a wxDB class // Author: Mark Johnson, mj10777@gmx.net // Modified by: // Created: 19991127.mj10777 // Copyright: (c) Mark Johnson // Licence: wxWindows license -//--------------------------------------------------------------------------- +// RCS-ID: $Id$ +//---------------------------------------------------------------------------------------- //-- 1) -//--------------------------------------------------------------------------- -//-- all #ifdefs that the whole Project needs. ------------------------------ -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- +//-- all #ifdefs that the whole Project needs. ------------------------------------------- +//---------------------------------------------------------------------------------------- #ifdef __GNUG__ - #pragma implementation - #pragma interface +#pragma implementation +#pragma interface #endif -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- #ifdef __BORLANDC__ - #pragma hdrstop +#pragma hdrstop #endif -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- #ifndef WX_PRECOMP - #include "wx/wx.h" +#include "wx/wx.h" #endif -//--------------------------------------------------------------------------- -#include +//---------------------------------------------------------------------------------------- #include "std.h" -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- // Global structure for holding ODBC connection information // - darf nur einmal im Projekte definiert werden ?? Extra Databasse Klasse ? struct DbStuff ConnectInf; // Für DBase -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- extern DbList* WXDLLEXPORT PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */ -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- char *GetExtendedDBErrorMsg(char *ErrFile, int ErrLine) { static wxString msg; @@ -72,96 +72,8 @@ char *GetExtendedDBErrorMsg(char *ErrFile, int ErrLine) msg += "\n"; return (char*) (const char*) msg; } // GetExtendedDBErrorMsg -////////////////////////////////////////////////////////////////////////////////// -// BJO 20000115 : New stuff : dialog to ask for username and password -////////////////////////////////////////////////////////////////////////////////// -class UserDialog : public wxDialog -{ - public: - UserDialog(wxWindow* parent); - virtual ~UserDialog(); - void OnOK(wxCommandEvent& event); - wxString s_UserName, s_Password; - - private: - wxButton *m_OK; - wxStaticText *m_Label1, *m_Label2; - wxTextCtrl *m_UserName, *m_Password; - - - DECLARE_EVENT_TABLE() -}; -//--------------------------------------------------------------------------- -BEGIN_EVENT_TABLE(UserDialog, wxDialog) - EVT_BUTTON(wxID_OK, UserDialog::OnOK) -END_EVENT_TABLE() -//--------------------------------------------------------------------------- -UserDialog::UserDialog(wxWindow *parent): - wxDialog(parent, -1, _("ODBC user"),wxDefaultPosition, wxSize(310, 300),wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE) -{ - wxLayoutConstraints* layout; - SetAutoLayout(TRUE); - //----------------------------------------------- - m_OK = new wxButton(this, wxID_OK, _("Ok")); - layout = new wxLayoutConstraints; - layout->left.SameAs(this, wxLeft, 10); - layout->top.SameAs(this, wxTop,10); - layout->height.AsIs(); - layout->width.Absolute(75); - m_OK->SetConstraints(layout); - - m_Label1 = new wxStaticText(this, -1, _("User name:")); - layout = new wxLayoutConstraints; - layout->left.SameAs(m_OK, wxLeft); - layout->top.SameAs(m_OK, wxBottom, 10); - layout->height.AsIs(); - layout->width.AsIs(); - m_Label1->SetConstraints(layout); - m_UserName = new wxTextCtrl(this, -1, ""); - layout = new wxLayoutConstraints; - layout->left.SameAs(m_OK, wxLeft); - layout->top.SameAs(m_Label1, wxBottom, 3); - layout->width.AsIs(); - layout->height.AsIs(); - m_UserName->SetConstraints(layout); - - m_Label2 = new wxStaticText(this, -1, _("Password:")); - layout = new wxLayoutConstraints; - layout->left.SameAs(m_OK, wxLeft); - layout->top.SameAs(m_UserName, wxBottom, 10); - layout->height.AsIs(); - layout->width.AsIs(); - m_Label2->SetConstraints(layout); - - m_Password = new wxTextCtrl(this, -1, "", wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD); - layout = new wxLayoutConstraints; - layout->left.SameAs(m_OK, wxLeft); - layout->width.AsIs(); - layout->top.SameAs(m_Label2, wxBottom, 3); - layout->height.AsIs(); - m_Password->SetConstraints(layout); - - s_UserName = ""; - s_Password = ""; - - Layout(); -} -//--------------------------------------------------------------------------- -UserDialog::~UserDialog() -{ -} -//--------------------------------------------------------------------------- -void UserDialog::OnOK(wxCommandEvent& WXUNUSED(event)) -{ - strcpy(ConnectInf.Uid, m_UserName->GetValue()); - strcpy(ConnectInf.AuthStr, m_Password->GetValue()); - EndModal(1); -} -////////////////////////////////////////////////////////////////////////////////// -// BJO 20000115 : end of new stuff -////////////////////////////////////////////////////////////////////////////////// -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- BrowserDB::BrowserDB() { Zeiger_auf_NULL(0); @@ -171,12 +83,12 @@ BrowserDB::BrowserDB() OnFillSqlTyp(); OnFilldbTyp(); } // BrowserDB Constructor -//--------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- BrowserDB::~BrowserDB() { Zeiger_auf_NULL(1); // Clean up Tables and Databases (Commit, Close und delete) } // BrowserDB destructor -//-------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- bool BrowserDB::Initialize(int Quite) { if (!OnStartDB(Quite)) @@ -186,9 +98,10 @@ bool BrowserDB::Initialize(int Quite) } return TRUE; } // BrowserDB:Initialize -//-------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- bool BrowserDB::OnStartDB(int Quite) { + wxStopWatch sw; if (!Quite) wxLogMessage(_("\n-I-> BrowserDB::OnStartDB(%s) : Begin "),ODBCSource.c_str()); if (db_BrowserDB != NULL) @@ -204,51 +117,59 @@ bool BrowserDB::OnStartDB(int Quite) wxLogMessage(_("\n-E-> BrowserDB::OnStartDB() : DB CONNECTION ERROR : A problem occured while trying to get a connection to the data source")); return FALSE; } - //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------- // Connect to datasource - //--------------------------- - DlgUser p_Dlg(pDoc->p_MainFrame, "Username and Password", wxPoint(100, 100), wxSize(340, 170)); - p_Dlg.s_DSN = ODBCSource; - p_Dlg.s_User = UserName; - p_Dlg.s_Password = Password; - p_Dlg.OnInit(); - if (p_Dlg.ShowModal() == wxID_OK) + //--------------------------------------------------------------------------------------- + DlgUser *p_Dlg; + p_Dlg = new DlgUser(pDoc->p_MainFrame,pDoc,""); + p_Dlg->s_DSN = ODBCSource; + p_Dlg->s_User = UserName; + p_Dlg->s_Password = Password; + p_Dlg->OnInit(); + p_Dlg->Fit(); + + bool OK = FALSE; + if (p_Dlg->ShowModal() == wxID_OK) { - (pDoc->p_DSN+i_Which)->Usr = p_Dlg.s_User; - (pDoc->p_DSN+i_Which)->Pas = p_Dlg.s_Password; - UserName = p_Dlg.s_User; - Password = p_Dlg.s_Password; + (pDoc->p_DSN+i_Which)->Usr = p_Dlg->s_User; + (pDoc->p_DSN+i_Which)->Pas = p_Dlg->s_Password; + UserName = p_Dlg->s_User; + Password = p_Dlg->s_Password; + OK = TRUE; } - p_Dlg.Destroy(); - //--------------------------- - strcpy(ConnectInf.Dsn, ODBCSource); // ODBC data source name (created with ODBC Administrator under Win95/NT) - strcpy(ConnectInf.Uid, UserName); // database username - must already exist in the data source - strcpy(ConnectInf.AuthStr, Password); // password database username - db_BrowserDB = GetDbConnection(&ConnectInf); - // wxLogMessage(">>>%s<<<>>>%s<<<",UserName.c_str(),Password.c_str()); - if (db_BrowserDB == NULL) + delete p_Dlg; + if (OK) { - strcpy(ConnectInf.Dsn, ""); - strcpy(ConnectInf.Uid, ""); - strcpy(ConnectInf.AuthStr, ""); + //-------------------------------------------------------------------------------------- + strcpy(ConnectInf.Dsn, ODBCSource); // ODBC data source name (created with ODBC Administrator under Win95/NT) + strcpy(ConnectInf.Uid, UserName); // database username - must already exist in the data source + strcpy(ConnectInf.AuthStr, Password); // password database username + db_BrowserDB = GetDbConnection(&ConnectInf); + // wxLogMessage(">>>%s<<<>>>%s<<<",UserName.c_str(),Password.c_str()); + if (db_BrowserDB == NULL) + { + strcpy(ConnectInf.Dsn, ""); + strcpy(ConnectInf.Uid, ""); + strcpy(ConnectInf.AuthStr, ""); + if (!Quite) + { + wxLogMessage(_("\n-E-> BrowserDB::OnConnectDataSource() DB CONNECTION ERROR : Unable to connect to the data source.\n\nCheck the name of your data source to verify it has been correctly entered/spelled.\n\nWith some databases, the user name and password must\nbe created with full rights to the table prior to making a connection\n(using tools provided by the database manufacturer)")); + wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End - Time needed : %ld ms"),ODBCSource.c_str(),sw.Time()); + } + return FALSE; + } + //-------------------------------------------------------------------------------------- if (!Quite) { - wxLogMessage(_("\n-E-> BrowserDB::OnConnectDataSource() DB CONNECTION ERROR : Unable to connect to the data source.\n\nCheck the name of your data source to verify it has been correctly entered/spelled.\n\nWith some databases, the user name and password must\nbe created with full rights to the table prior to making a connection\n(using tools provided by the database manufacturer)")); - wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End "),ODBCSource.c_str()); + Temp1 = db_BrowserDB->GetDatabaseName(); + Temp2 = db_BrowserDB->GetDataSource(); + wxLogMessage(_("-I-> BrowserDB::OnGetDataSourceODBC() - DatabaseName(%s) ; DataSource(%s)"),Temp1.c_str(),Temp2.c_str()); + wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End - Time needed : %ld ms"),ODBCSource.c_str(),sw.Time()); } - return FALSE; - } - //-------------------------------------------------------------------------- - if (!Quite) - { - Temp1 = db_BrowserDB->GetDatabaseName(); - Temp2 = db_BrowserDB->GetDataSource(); - wxLogMessage(_("-I-> BrowserDB::OnGetDataSourceODBC() - DatabaseName(%s) ; DataSource(%s)"),Temp1.c_str(),Temp2.c_str()); - wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End "),ODBCSource.c_str()); - } - return TRUE; + return TRUE; + } else return FALSE; } -//-------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- bool BrowserDB::OnCloseDB(int Quite) { if (!Quite) @@ -316,87 +237,87 @@ bool BrowserDB::OnGetNext(int Cols,int Quite) switch(i_dbDataType) { case DB_DATA_TYPE_VARCHAR: - strcpy(s_temp,""); - if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_dbDataType,&s_temp,sizeof(s_temp), &cb)) - { - Temp0.Printf(_("\n-E-> BrowserDB::OnGetNext - ODBC-Error with GetNext of >%s<.\n-E-> "),(cl_BrowserDB+i)->tableName); - Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxLogMessage(Temp0); - } - Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,s_temp); - strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); - break; + strcpy(s_temp,""); + if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_dbDataType,&s_temp,sizeof(s_temp), &cb)) + { + Temp0.Printf(_("\n-E-> BrowserDB::OnGetNext - ODBC-Error with GetNext of >%s<.\n-E-> "),(cl_BrowserDB+i)->tableName); + Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__); + wxLogMessage(Temp0); + } + Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,s_temp); + strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); + break; case DB_DATA_TYPE_INTEGER: - l_temp = 0; - if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_sqlDataType,&l_temp,sizeof(l_temp), &cb)) - { - Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> ")); - Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__); - } - else - { - Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,l_temp); - strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); - } - break; + l_temp = 0; + if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_sqlDataType,&l_temp,sizeof(l_temp), &cb)) + { + Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> ")); + Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__); + } + else + { + Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,l_temp); + strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); + } + break; case DB_DATA_TYPE_FLOAT: - f_temp = 0; - if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_sqlDataType,&f_temp,sizeof(f_temp), &cb)) - { - Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> ")); - Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(Temp0); - } - else - { - Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,f_temp); - strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); - } - break; + f_temp = 0; + if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_sqlDataType,&f_temp,sizeof(f_temp), &cb)) + { + Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> ")); + Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__); + wxMessageBox(Temp0); + } + else + { + Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,f_temp); + strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); + } + break; case DB_DATA_TYPE_DATE: - t_temp.day = t_temp.month = t_temp.year = t_temp.hour = t_temp.minute = t_temp.second = t_temp.fraction = 0; - if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_sqlDataType,&t_temp,sizeof(t_temp), &cb)) - { - Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> ")); - Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__); - } - else - { - // i_Nation = 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US - if (((cl_BrowserDB->pColFor+i)->i_Nation == 0) || // TS YYYY-MM-DD - ((cl_BrowserDB->pColFor+i)->i_Nation == 3)) // IT YYYY-MM-DD - { - Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,t_temp.year,t_temp.month,t_temp.day, + t_temp.day = t_temp.month = t_temp.year = t_temp.hour = t_temp.minute = t_temp.second = t_temp.fraction = 0; + if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_sqlDataType,&t_temp,sizeof(t_temp), &cb)) + { + Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> ")); + Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__); + } + else + { + // i_Nation = 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US + if (((cl_BrowserDB->pColFor+i)->i_Nation == 0) || // TS YYYY-MM-DD + ((cl_BrowserDB->pColFor+i)->i_Nation == 3)) // IT YYYY-MM-DD + { + Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,t_temp.year,t_temp.month,t_temp.day, t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction); - strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); - } - if ( ((cl_BrowserDB->pColFor+i)->i_Nation == 1) || // EU DD.MM.YYYY - ((cl_BrowserDB->pColFor+i)->i_Nation == 2)) // UK DD/MM/YYYY - { - Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,t_temp.day,t_temp.month,t_temp.year, + strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); + } + if (((cl_BrowserDB->pColFor+i)->i_Nation == 1) || // EU DD.MM.YYYY + ((cl_BrowserDB->pColFor+i)->i_Nation == 2)) // UK DD/MM/YYYY + { + Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,t_temp.day,t_temp.month,t_temp.year, t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction); - strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); - } - if ((cl_BrowserDB->pColFor+i)->i_Nation == 3) // US MM/DD/YYYY - { - Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,t_temp.month,t_temp.day,t_temp.year, + strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); + } + if ((cl_BrowserDB->pColFor+i)->i_Nation == 3) // US MM/DD/YYYY + { + Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,t_temp.month,t_temp.day,t_temp.year, t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction); - strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); - } - } - break; + strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); + } + } + break; default: - AnzError++; - if (AnzError <= 100) - { - Temp0 = (cl_BrowserDB+i)->colName; - wxLogMessage(_("-E-> BrowserDB::OnGetNext - DB_DATA_TYPE_?? (%d) in Col(%s)"),(cl_BrowserDB->pColFor+i)->i_dbDataType,Temp0.c_str()); - } - else - return TRUE; - Temp0.Printf(_("-E-> unknown Format(%d) - sql(%d)"),(cl_BrowserDB->pColFor+i)->i_dbDataType,(cl_BrowserDB->pColFor+i)->i_sqlDataType); - strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); - break; + AnzError++; + if (AnzError <= 100) + { + Temp0 = (cl_BrowserDB+i)->colName; + wxLogMessage(_("-E-> BrowserDB::OnGetNext - DB_DATA_TYPE_?? (%d) in Col(%s)"),(cl_BrowserDB->pColFor+i)->i_dbDataType,Temp0.c_str()); + } + else + return TRUE; + Temp0.Printf(_("-E-> unknown Format(%d) - sql(%d)"),(cl_BrowserDB->pColFor+i)->i_dbDataType,(cl_BrowserDB->pColFor+i)->i_sqlDataType); + strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str()); + break; }; } } @@ -406,9 +327,10 @@ bool BrowserDB::OnGetNext(int Cols,int Quite) //---------------------------------------------------------------------------------------- bool BrowserDB::OnSelect(wxString tb_Name, int Quite) { + wxStopWatch sw; wxString SQLStmt; i_Records = 0; - //-------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------- SQLStmt.sprintf("SELECT * FROM %s",tb_Name.c_str()); if (!db_BrowserDB->ExecSql((char *)(SQLStmt.GetData()))) { @@ -418,12 +340,12 @@ bool BrowserDB::OnSelect(wxString tb_Name, int Quite) wxMessageBox("-E-> BrowserDB::OnSelect - GetData()"); return FALSE; } - //-------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------- while (db_BrowserDB->GetNext()) { i_Records++; } - //-------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------- if (!db_BrowserDB->ExecSql((char *)(SQLStmt.GetData()))) { Temp0.Printf(_("\n-E-> BrowserDB::OnSelect - ODBC-Error with ExecSql of >%s<.\n-E-> "),tb_Name.c_str()); @@ -431,19 +353,19 @@ bool BrowserDB::OnSelect(wxString tb_Name, int Quite) wxLogMessage(Temp0); return FALSE; } - //-------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------- // SetColDefs ( 0,"NAME", DB_DATA_TYPE_VARCHAR, Name, SQL_C_CHAR, sizeof(Name), TRUE, TRUE); // Primary index - //-------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------- if (!Quite) { - wxLogMessage(_("\n-I-> BrowserDB::OnSelect(%s) Records(%d): End "),tb_Name.c_str(),i_Records); + wxLogMessage(_("\n-I-> BrowserDB::OnSelect(%s) Records(%d): End - Time needed : %ld ms"),tb_Name.c_str(),i_Records,sw.Time()); } return TRUE; } //---------------------------------------------------------------------------------------- bool BrowserDB::OnExecSql(wxString SQLStmt, int Quite) { - //-------------------------------------------------------------------------- + //--------------------------------------------------------------------------------------- if (!db_BrowserDB->ExecSql((char *)(SQLStmt.GetData()))) { Temp0.Printf(_("\n-E-> BrowserDB::OnExecSQL - ODBC-Error with ExecSql of >%s<.\n-E-> "),SQLStmt.c_str()); @@ -456,7 +378,7 @@ bool BrowserDB::OnExecSql(wxString SQLStmt, int Quite) } if (!Quite) { - // wxLogMessage(_("\n-I-> BrowserDB::OnExecSql(%s) - End "),SQLStmt.c_str()); + // wxLogMessage(_("\n-I-> BrowserDB::OnExecSql(%s) - End - Time needed : %ld ms"),SQLStmt.c_str(),sw.Time()); } return TRUE; } @@ -479,7 +401,7 @@ wxColInf* BrowserDB::OnGetColumns(char *tableName, int numCols,int Quite) for (i=0;ipColFor+i)->Format(1,(cl_BrowserDB+i)->dbDataType,(cl_BrowserDB+i)->sqlDataType, - (cl_BrowserDB+i)->columnSize, (cl_BrowserDB+i)->decimalDigits); + (cl_BrowserDB+i)->columnSize, (cl_BrowserDB+i)->decimalDigits); } return cl_BrowserDB; }