Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-10-06 20:54:57 +00:00
parent 958d3a7e4b
commit 925e9792d3
46 changed files with 377 additions and 469 deletions

View File

@@ -654,7 +654,7 @@ bool DatabaseDemoApp::OnInit()
// WARNING: Be certain that you do not free this handle
// directly with SQLFreeEnv(). Use either the
// method ::FreeHenv() or delete the DbConnectInf.
DbConnectInf = new wxDbConnectInf(NULL, params.ODBCSource, params.UserName,
DbConnectInf = new wxDbConnectInf(NULL, params.ODBCSource, params.UserName,
params.Password, params.DirPath);
if (!DbConnectInf || !DbConnectInf->GetHenv())
@@ -963,7 +963,7 @@ void DatabaseDemoFrame::BuildEditorDialog()
wxMessageBox(wxT("Unable to initialize the editor dialog for some reason"),wxT("Error..."),wxOK | wxICON_EXCLAMATION);
Close();
}
}
}
else
{
wxMessageBox(wxT("Unable to create the editor dialog for some reason"),wxT("Error..."),wxOK | wxICON_EXCLAMATION);
@@ -985,24 +985,24 @@ void DatabaseDemoFrame::BuildParameterDialog(wxWindow *parent)
* Constructor note: If no wxDb object is passed in, a new connection to the database
* is created for this instance of Ccontact. This can be a slow process depending
* on the database engine being used, and some database engines have a limit on the
* number of connections (either hard limits, or license restricted) so care should
* be used to use as few connections as is necessary.
* number of connections (either hard limits, or license restricted) so care should
* be used to use as few connections as is necessary.
*
* IMPORTANT: Objects which share a wxDb pointer are ALL acted upon whenever a member
* function of pDb is called (i.e. CommitTrans() or RollbackTrans(), so if modifying
* IMPORTANT: Objects which share a wxDb pointer are ALL acted upon whenever a member
* function of pDb is called (i.e. CommitTrans() or RollbackTrans(), so if modifying
* or creating a table objects which use the same pDb, know that all the objects
* will be committed or rolled back when any of the objects has this function call made.
*/
Ccontact::Ccontact (wxDb *pwxDb) : wxDbTable(pwxDb ? pwxDb : wxDbGetConnection(wxGetApp().DbConnectInf),
CONTACT_TABLE_NAME, CONTACT_NO_COLS, wxT(""),
CONTACT_TABLE_NAME, CONTACT_NO_COLS, wxEmptyString,
!wxDB_QUERY_ONLY, wxGetApp().DbConnectInf->GetDefaultDir())
{
// This is used to represent whether the database connection should be released
// when this instance of the object is deleted. If using the same connection
// for multiple instance of database objects, then the connection should only be
// for multiple instance of database objects, then the connection should only be
// released when the last database instance using the connection is deleted
freeDbConn = !pwxDb;
if (GetDb())
GetDb()->SetSqlLogging(sqlLogON);
@@ -1053,7 +1053,7 @@ Ccontact::~Ccontact()
/*
* Handles setting up all the connections for the interface from the wxDbTable
* functions to interface to the data structure used to store records in
* functions to interface to the data structure used to store records in
* memory, and for all the column definitions that define the table structure
*/
void Ccontact::SetupColumns()
@@ -1080,7 +1080,7 @@ void Ccontact::SetupColumns()
bool Ccontact::CreateIndexes(bool recreate)
{
// This index could easily be accomplished with an "orderBy" clause,
// This index could easily be accomplished with an "orderBy" clause,
// but is done to show how to construct a non-primary index.
wxString indexName;
wxDbIdxDef idxDef[2];
@@ -1134,12 +1134,12 @@ bool Ccontact::FetchByName(const wxString &name)
* An instance of Ccontact is created - "Contact" - which is used to hold the Ccontact
* object that is currently being worked with.
*/
BEGIN_EVENT_TABLE(CeditorDlg, wxPanel)
EVT_BUTTON(wxID_ANY, CeditorDlg::OnButton)
EVT_CLOSE(CeditorDlg::OnCloseWindow)
END_EVENT_TABLE()
CeditorDlg::CeditorDlg(wxWindow *parent) : wxPanel (parent, 0, 0, 537, 480)
{
// Since the ::OnCommand() function is overridden, this prevents the widget
@@ -1180,7 +1180,7 @@ void CeditorDlg::OnButton(wxCommandEvent &event)
void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
{
wxString widgetName;
widgetName = win.GetName();
if (!widgetPtrsSet)
@@ -1221,10 +1221,10 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
if (Ok && wxGetApp().Contact->Delete())
{
// NOTE: Deletions are not finalized until a CommitTrans() is performed.
// If the commit were not performed, the program will continue to
// NOTE: Deletions are not finalized until a CommitTrans() is performed.
// If the commit were not performed, the program will continue to
// show the table contents as if they were deleted until this instance
// of Ccontact is deleted. If the Commit wasn't performed, the
// of Ccontact is deleted. If the Commit wasn't performed, the
// database will automatically Rollback the changes when the database
// connection is terminated
wxGetApp().Contact->GetDb()->CommitTrans();
@@ -1300,7 +1300,7 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
tStr = wxT("ODBC error during Query()\n\n");
wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),wxGetApp().Contact->GetDb(),__TFILE__,__LINE__),
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
SetMode(mView);
return;
}
@@ -1352,7 +1352,7 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
wxGetApp().Contact->whereStr = wxT("NAME = (SELECT MIN(NAME) FROM ");
wxGetApp().Contact->whereStr += CONTACT_TABLE_NAME;
}
// Append the query where string (if there is one)
wxGetApp().Contact->qryWhereStr = qryWhere;
if (wxStrlen(qryWhere))
@@ -1470,7 +1470,7 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
bool CeditorDlg::Initialize()
{
// Create the data structure and a new database connection.
// Create the data structure and a new database connection.
// (As there is not a pDb being passed in the constructor, a new database
// connection is created)
wxGetApp().Contact = new Ccontact();
@@ -1481,10 +1481,10 @@ bool CeditorDlg::Initialize()
return false;
}
// Check if the table exists or not. If it doesn't, ask the user if they want to
// Check if the table exists or not. If it doesn't, ask the user if they want to
// create the table. Continue trying to create the table until it exists, or user aborts
while (!wxGetApp().Contact->GetDb()->TableExists((wxChar *)CONTACT_TABLE_NAME,
wxGetApp().DbConnectInf->GetUserID(),
while (!wxGetApp().Contact->GetDb()->TableExists((wxChar *)CONTACT_TABLE_NAME,
wxGetApp().DbConnectInf->GetUserID(),
wxGetApp().DbConnectInf->GetDefaultDir()))
{
wxString tStr;
@@ -1522,7 +1522,7 @@ bool CeditorDlg::Initialize()
wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),wxGetApp().Contact->GetDb(),__TFILE__,__LINE__),
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
}
else
else
#endif
if (!wxGetApp().Contact->GetDb()->TableExists(CONTACT_TABLE_NAME,
wxGetApp().Contact->GetDb()->GetUsername(),
@@ -1593,14 +1593,14 @@ bool CeditorDlg::Initialize()
pDataTypesBtn = new wxButton(this, EDITOR_DIALOG_DATATYPES, wxT("Data&types"), wxPoint(430, 337), wxSize( 70, 35), 0, wxDefaultValidator, wxT("DataTypesBtn"));
pDbDiagsBtn = new wxButton(this, EDITOR_DIALOG_DB_DIAGS, wxT("DB Dia&gs"), wxPoint(430, 387), wxSize( 70, 35), 0, wxDefaultValidator, wxT("DbDiagsBtn"));
// Now that all the widgets on the panel are created, its safe to allow ::OnCommand() to
// Now that all the widgets on the panel are created, its safe to allow ::OnCommand() to
// handle all widget processing
widgetPtrsSet = true;
// Setup the orderBy and where clauses to return back a single record as the result set,
// Setup the orderBy and where clauses to return back a single record as the result set,
// as there will only be one record being shown on the dialog at a time, this optimizes
// network traffic by only returning a one row result
wxGetApp().Contact->SetOrderByClause(wxT("NAME")); // field name to sort by
// The wxString "whereStr" is not a member of the wxDbTable object, it is a member variable
@@ -1608,9 +1608,9 @@ bool CeditorDlg::Initialize()
// length string, and then after the string is built, the wxDbTable member variable "where" is
// assigned the pointer to the constructed string.
//
// The constructed where clause below has a sub-query within it "SELECT MIN(NAME) FROM %s"
// The constructed where clause below has a sub-query within it "SELECT MIN(NAME) FROM %s"
// to achieve a single row (in this case the first name in alphabetical order).
if (wxGetApp().Contact->GetDb()->Dbms() != dbmsPOSTGRES &&
wxGetApp().Contact->GetDb()->Dbms() != dbmsMY_SQL)
{
@@ -1622,8 +1622,8 @@ bool CeditorDlg::Initialize()
else
wxGetApp().Contact->SetWhereClause(wxT(""));
// Perform the Query to get the result set.
// NOTE: If there are no rows returned, that is a valid result, so Query() would return true.
// Perform the Query to get the result set.
// NOTE: If there are no rows returned, that is a valid result, so Query() would return true.
// Only if there is a database error will Query() come back as false
if (!wxGetApp().Contact->Query())
{
@@ -1636,8 +1636,8 @@ bool CeditorDlg::Initialize()
// Since Query succeeded, now get the row that was returned
if (!wxGetApp().Contact->GetNext())
// If the GetNext() failed at this point, then there are no rows to retrieve,
// so clear the values in the members of "Contact" so that PutData() blanks the
// If the GetNext() failed at this point, then there are no rows to retrieve,
// so clear the values in the members of "Contact" so that PutData() blanks the
// widgets on the dialog
wxGetApp().Contact->Initialize();
/*
@@ -1817,9 +1817,9 @@ bool CeditorDlg::GetData()
if (!invalid)
{
wxGetApp().Contact->JoinDate.month = mm;
wxGetApp().Contact->JoinDate.day = dd;
wxGetApp().Contact->JoinDate.year = yyyy;
wxGetApp().Contact->JoinDate.month = (SQLUSMALLINT)mm;
wxGetApp().Contact->JoinDate.day = (SQLUSMALLINT)dd;
wxGetApp().Contact->JoinDate.year = (SQLSMALLINT)yyyy;
}
else
{
@@ -1836,7 +1836,7 @@ bool CeditorDlg::GetData()
wxStrcpy(wxGetApp().Contact->Country,pCountryTxt->GetValue());
wxStrcpy(wxGetApp().Contact->PostalCode,pPostalCodeTxt->GetValue());
wxGetApp().Contact->Contributions = wxAtoi(pContribTxt->GetValue());
wxGetApp().Contact->Contributions = (UCHAR)wxAtoi(pContribTxt->GetValue());
wxGetApp().Contact->LinesOfCode = wxAtol(pLinesTxt->GetValue());
wxGetApp().Contact->NativeLanguage = (enum Language) pNativeLangChoice->GetSelection();
@@ -1870,7 +1870,7 @@ bool CeditorDlg::Save()
if (mode == mCreate)
{
RETCODE result = wxGetApp().Contact->Insert();
RETCODE result = (RETCODE)wxGetApp().Contact->Insert();
failed = (result != DB_SUCCESS);
if (failed)
@@ -2054,7 +2054,7 @@ CparameterDlg::CparameterDlg(wxWindow *parent) : wxDialog (parent, PARAMETER_DIA
pParamSaveBtn = new wxButton(this, PARAMETER_DIALOG_SAVE, wxT("&Save"), wxPoint(310, 21), wxSize( 70, 35), 0, wxDefaultValidator, wxT("ParamSaveBtn"));
pParamCancelBtn = new wxButton(this, PARAMETER_DIALOG_CANCEL, wxT("C&ancel"), wxPoint(310, 66), wxSize( 70, 35), 0, wxDefaultValidator, wxT("ParamCancelBtn"));
// Now that all the widgets on the panel are created, its safe to allow ::OnCommand() to
// Now that all the widgets on the panel are created, its safe to allow ::OnCommand() to
// handle all widget processing
widgetPtrsSet = true;
@@ -2074,13 +2074,13 @@ void CparameterDlg::OnCloseWindow(wxCloseEvent& event)
if (!saved)
{
bool Ok = (wxMessageBox(wxT("No changes have been saved.\n\nAre you sure you wish exit the parameter screen?"),wxT("Confirm"),wxYES_NO|wxICON_QUESTION) == wxYES);
if (!Ok)
{
event.Veto();
return;
}
wxGetApp().params = savedParamSettings;
}
@@ -2107,7 +2107,7 @@ void CparameterDlg::OnButton( wxCommandEvent &event )
void CparameterDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
{
wxString widgetName;
widgetName = win.GetName();
if (!widgetPtrsSet)
@@ -2172,7 +2172,7 @@ bool CparameterDlg::GetData()
}
else
return false;
tStr = pParamUserNameTxt->GetValue();
if (tStr.Length() > (sizeof(wxGetApp().params.UserName)-1))
{
@@ -2248,9 +2248,9 @@ BEGIN_EVENT_TABLE(CqueryDlg, wxDialog)
EVT_CLOSE(CqueryDlg::OnCloseWindow)
END_EVENT_TABLE()
// CqueryDlg() constructor
CqueryDlg::CqueryDlg(wxWindow *parent, wxDb *pDb, wxChar *tblName[],
CqueryDlg::CqueryDlg(wxWindow *parent, wxDb *pDb, wxChar *tblName[],
const wxString &pWhereArg) :
wxDialog (parent, QUERY_DIALOG, wxT("Query"), wxDefaultPosition, wxSize(480, 360))
{
@@ -2363,11 +2363,6 @@ CqueryDlg::CqueryDlg(wxWindow *parent, wxDb *pDb, wxChar *tblName[],
} // CqueryDlg() constructor
CqueryDlg::~CqueryDlg()
{
} // CqueryDlg::~CqueryDlg() destructor
void CqueryDlg::OnButton(wxCommandEvent &event)
{
wxWindow *win = (wxWindow*) event.GetEventObject();
@@ -2630,10 +2625,10 @@ void CqueryDlg::ProcessAddBtn()
// Build the expression and append it to the where clause window
wxString s = pQueryCol1Choice->GetStringSelection();
if (pQueryNotCheck->GetValue() && (oper != qryOpEQ))
s += wxT(" NOT");
switch(oper)
{
case qryOpEQ:
@@ -2712,8 +2707,8 @@ void CqueryDlg::ProcessCountBtn()
if (!dbTable) // wxDbTable object needs to be created and opened
{
dbTable = new wxDbTable(pDB, masterTableName, 0, wxT(""),
!wxDB_QUERY_ONLY,
dbTable = new wxDbTable(pDB, masterTableName, 0, wxEmptyString,
!wxDB_QUERY_ONLY,
wxGetApp().DbConnectInf->GetDefaultDir());
if (!dbTable)
{
@@ -3155,13 +3150,13 @@ bool DbGridFrame::Initialize()
grid->RegisterDataType(wxGRID_VALUE_CHOICEINT,
new wxGridCellEnumRenderer,
new wxGridCellEnumEditor);
wxString NativeLangChoice( wxString::Format(wxT("%s:%s,%s,%s,%s,%s"),wxGRID_VALUE_CHOICEINT,
wxString NativeLangChoice( wxString::Format(wxT("%s:%s,%s,%s,%s,%s"),wxGRID_VALUE_CHOICEINT,
wxT("English"),
wxT("French"),
wxT("German"),
wxT("Spanish"),
wxT("Other") ));
wxT("Other") ));
#endif
// Columns must match the sequence specified in SetColDef() calls
@@ -3179,7 +3174,7 @@ bool DbGridFrame::Initialize()
new wxDbGridColInfo(10,wxGRID_VALUE_NUMBER,wxT("Lines Of Code"),
#ifdef CHOICEINT
new wxDbGridColInfo(11,NativeLangChoice, wxT("Native Language"),NULL))))))))))));
#else
#else
new wxDbGridColInfo(11,wxGRID_VALUE_NUMBER,wxT("Native Language"),NULL))))))))))));
#endif

View File

@@ -68,7 +68,7 @@ void DisplayDbDiagnostics(wxDb *pDb);
//
// This class contains the actual data members that are used for transferring
// data back and forth from the database to the program.
// data back and forth from the database to the program.
//
// NOTE: The object described in this class is just for example purposes, and has no
// real meaning other than to show each type of field being used by the database
@@ -99,10 +99,10 @@ class CstructContact : public wxObject
// all combined in this one class.
//
class Ccontact : public wxDbTable, public CstructContact
{
{
private:
// Used to keep track of whether this class had a wxDb instance
// passed in to it or not. If an existing wxDb instance was not
// passed in to it or not. If an existing wxDb instance was not
// passed in at Ccontact creation time, then when the Ccontact
// instance is deleted, the connection will be freed as Ccontact
// created its own connection when it was created.
@@ -114,7 +114,7 @@ class Ccontact : public wxDbTable, public CstructContact
void SetupColumns();
public:
// Used in places where we need to construct a WHERE clause to
// Used in places where we need to construct a WHERE clause to
// be passed to the SetWhereClause() function. From example,
// where building the WHERE clause requires using ::Printf()
// to build the string.
@@ -151,7 +151,7 @@ typedef struct Cparameters
// Define a new frame type
class DatabaseDemoFrame: public wxFrame
{
{
private:
CeditorDlg *pEditorDlg;
CparameterDlg *pParamDlg;
@@ -169,7 +169,7 @@ class DatabaseDemoFrame: public wxFrame
void OnAbout(wxCommandEvent& event);
#if wxUSE_GRID
void OnDbGridTable( wxCommandEvent& );
#endif
#endif
void CreateDataTable(bool recreate);
void BuildEditorDialog();
void BuildParameterDialog(wxWindow *parent);
@@ -212,26 +212,26 @@ class DatabaseDemoApp: public wxApp
// Pointer to the main database connection used in the program. This
// pointer would normally be used for doing things as database lookups
// for user login names and passwords, getting workstation settings, etc.
//
//
// ---> IMPORTANT <---
//
//
// For each database object created which uses this wxDb pointer
// connection to the database, when a CommitTrans() or RollBackTrans()
// will commit or rollback EVERY object which uses this wxDb pointer.
//
// To allow each table object (those derived from wxDbTable) to be
//
// To allow each table object (those derived from wxDbTable) to be
// individually committed or rolled back, you MUST use a different
// instance of wxDb in the constructor of the table. Doing so creates
// instance of wxDb in the constructor of the table. Doing so creates
// more overhead, and will use more database connections (some DBs have
// connection limits...), so use connections sparringly.
//
//
// It is recommended that one "main" database connection be created for
// the entire program to use for READ-ONLY database accesses, but for each
// table object which will do a CommitTrans() or RollbackTrans() that a
// new wxDb object be created and used for it.
wxDb *READONLY_DB;
// Contains the ODBC connection information used by
// Contains the ODBC connection information used by
// all database connections
wxDbConnectInf *DbConnectInf;
@@ -259,13 +259,13 @@ class CeditorDlg : public wxPanel
{
private:
// Used to indicate whether all of the widget pointers (defined
// below) have been initialized to point to the memory for
// below) have been initialized to point to the memory for
// the named widget. Used as a safeguard from using the widget
// before it has been initialized.
bool widgetPtrsSet;
// Used when the EDIT button has been pressed to maintain the
// original name that was displayed in the editor before the
// Used when the EDIT button has been pressed to maintain the
// original name that was displayed in the editor before the
// EDIT button was pressed, so that if CANCEL is pressed, a
// FetchByName() can be done to retrieve the original data
// to repopulate the dialog.
@@ -318,7 +318,7 @@ class CeditorDlg : public wxPanel
// retrieved from the editor dialog
bool Save();
// Database functions for changing the data that is to
// Database functions for changing the data that is to
// be displayed on the dialog. GetNextRec()/GetPrevRec()
// provide database independent methods that do not require
// backward scrolling cursors to obtain the record that
@@ -326,7 +326,7 @@ class CeditorDlg : public wxPanel
bool GetNextRec();
bool GetPrevRec();
bool GetRec(const wxString &whereStr);
DECLARE_EVENT_TABLE()
}; // CeditorDlg
@@ -381,14 +381,14 @@ class CparameterDlg : public wxDialog
{
private:
// Used to indicate whether all of the widget pointers (defined
// below) have been initialized to point to the memory for
// below) have been initialized to point to the memory for
// the named widget. Used as a safeguard from using the widget
// before it has been initialized.
bool widgetPtrsSet;
enum DialogModes mode;
// Have the parameters been saved yet, or do they
// Have the parameters been saved yet, or do they
// need to be saved to update the params on disk
bool saved;
@@ -480,7 +480,7 @@ class CqueryDlg : public wxDialog
public:
// Used to indicate whether all of the widget pointers (defined
// below) have been initialized to point to the memory for
// below) have been initialized to point to the memory for
// the named widget. Used as a safeguard from using the widget
// before it has been initialized.
bool widgetPtrsSet;
@@ -515,7 +515,7 @@ class CqueryDlg : public wxDialog
wxTextCtrl *pFocusTxt;
CqueryDlg(wxWindow *parent, wxDb *pDb, wxChar *tblName[], const wxString &pWhereArg);
~CqueryDlg();
~CqueryDlg(){};
void OnButton( wxCommandEvent &event );
void OnCommand(wxWindow& win, wxCommandEvent& event);
@@ -572,7 +572,7 @@ wxChar * const langDBINF_OUTER_JOINS = wxT("Outer Joins = ");
wxChar * const langDBINF_STORED_PROC = wxT("Stored Procedures = ");
wxChar * const langDBINF_MAX_HDBC = wxT("Max # of Db connections = ");
wxChar * const langDBINF_MAX_HSTMT = wxT("Max # of cursors (per db connection) = ");
wxChar * const langDBINF_UNLIMITED = wxT("Unlimited or Unknown");
wxChar * const langDBINF_UNLIMITED = wxT("Unlimited or Unknown");
wxChar * const langDBINF_API_LVL = wxT("ODBC API conformance level = ");
wxChar * const langDBINF_CLI_LVL = wxT("Client (SAG) conformance level = ");
wxChar * const langDBINF_SQL_LVL = wxT("SQL conformance level = ");

View File

@@ -15,7 +15,7 @@
Member functions for the classes defined in LISTDB.H
This class is used to present a generic ListBox lookup window for
use with any of the object creation/selection choice widgets. This
use with any of the object creation/selection choice widgets. This
dialog window will present a (possibly) scrolling list of values
that come from a data table source. Based on the object type passed
in the constructor, a ListBox is built to present the user with a
@@ -28,7 +28,7 @@
For each object (database) type that is to be used, an overridden
constructor should be written to appropriately link to the proper
data table/object for building the list.
The data table record access is all handled through the routines
in this module, interfacing with the methods defined in wxDbTable.
@@ -36,7 +36,7 @@
have opened the table prior to passing them in the dialog
constructor, and the 'where' query should already have been set
and performed before creating this dialog instance.
// SYNOPSIS STOP
*/
@@ -108,7 +108,7 @@ const wxChar *GetExtendedDBErrorMsg2(wxDb *pDb, wxChar *ErrFile, int ErrLine)
msg.Append (wxT("\nODBC errors:\n"));
msg += wxT("\n");
// Display errors for this connection
int i;
for (i = 0; i < DB_MAX_ERROR_HISTORY; i++)
@@ -131,7 +131,7 @@ const wxChar *GetExtendedDBErrorMsg2(wxDb *pDb, wxChar *ErrFile, int ErrLine)
// Clookup constructor
Clookup::Clookup(wxChar *tblName, wxChar *colName, wxDb *pDb, const wxString &defDir)
: wxDbTable(pDb, tblName, 1, wxT(""), !wxDB_QUERY_ONLY,
: wxDbTable(pDb, tblName, 1, wxEmptyString, !wxDB_QUERY_ONLY,
defDir)
{
@@ -143,7 +143,7 @@ Clookup::Clookup(wxChar *tblName, wxChar *colName, wxDb *pDb, const wxString &de
// Clookup2 constructor
Clookup2::Clookup2(wxChar *tblName, wxChar *colName1, wxChar *colName2,
wxDb *pDb, const wxString &defDir)
: wxDbTable(pDb, tblName, (1 + (wxStrlen(colName2) > 0)), wxT(""),
: wxDbTable(pDb, tblName, (UWORD)(1 + (wxStrlen(colName2) > 0)), wxEmptyString,
!wxDB_QUERY_ONLY, defDir)
{
wxASSERT(pDb);
@@ -153,10 +153,10 @@ Clookup2::Clookup2(wxChar *tblName, wxChar *colName1, wxChar *colName2,
int i = 0;
SetColDefs (i, colName1, DB_DATA_TYPE_VARCHAR, lookupCol1, SQL_C_CHAR, LOOKUP_COL_LEN+1, false, false);
SetColDefs ((UWORD)i, colName1, DB_DATA_TYPE_VARCHAR, lookupCol1, SQL_C_CHAR, LOOKUP_COL_LEN+1, false, false);
if (wxStrlen(colName2) > 0)
SetColDefs (++i, colName2, DB_DATA_TYPE_VARCHAR, lookupCol2, SQL_C_CHAR, LOOKUP_COL_LEN+1, false, false);
SetColDefs ((UWORD)(++i), colName2, DB_DATA_TYPE_VARCHAR, lookupCol2, SQL_C_CHAR, LOOKUP_COL_LEN+1, false, false);
} // Clookup2()
@@ -175,7 +175,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, wxChar *windowTitle, wxChar *tableName,
: wxDialog (parent, LOOKUP_DIALOG, wxT("Select..."), wxDefaultPosition, wxSize(400, 290))
{
wxBeginBusyCursor();
wxStrcpy(ListDB_Selection,wxT(""));
widgetPtrsSet = false;
lookup = 0;
@@ -267,12 +267,12 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, wxChar *windowTitle, wxChar *tableName,
//
ClookUpDlg::ClookUpDlg(wxWindow *parent, wxChar *windowTitle, wxChar *tableName,
wxChar *dispCol1, wxChar *dispCol2, wxChar *where, wxChar *orderBy,
wxDb *pDb, const wxString &defDir, bool distinctValues,
wxDb *pDb, const wxString &defDir, bool distinctValues,
wxChar *selectStmt, int maxLenCol1, bool allowOk)
: wxDialog (parent, LOOKUP_DIALOG, wxT("Select..."), wxDefaultPosition, wxSize(400, 290))
{
wxBeginBusyCursor();
wxStrcpy(ListDB_Selection,wxT(""));
wxStrcpy(ListDB_Selection2,wxT(""));
widgetPtrsSet = false;