Added code to show off wxDbGrid (contributed by Paul and Roger Gammans) in wxUSE_NEW_GRID is set to 1. If grid is not enabled, the program does not compile in the wxDbGrid portion of the sample

Fixed a bug in the SetColDef() descriptions that had the Contribs column defined as a UCHAR but the SQL data type was set to be SQL_C_SHORT when it needed to be SQL_C_UTINYINT to match the size of the UCHAR data variable
General code cleanup
TRUE/FALSE changed to true/false
Now uses new wxDbLogExtendedErrorMsg() function for reporting human readable ODBC errors


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2001-06-10 17:12:56 +00:00
parent fa464e825d
commit f21b2fd89d
4 changed files with 366 additions and 236 deletions

View File

@@ -22,6 +22,9 @@ enum DialogModes {mView,mCreate,mEdit,mSearch};
#define FILE_CREATE 100
#define FILE_RECREATE_TABLE 110
#define FILE_RECREATE_INDEXES 120
#if wxUSE_NEW_GRID
#define FILE_DBGRID_TABLE 130
#endif
#define FILE_EXIT 199
#define EDIT_PARAMETERS 200
#define HELP_ABOUT 300
@@ -166,7 +169,10 @@ class DatabaseDemoFrame: public wxFrame
void OnExit(wxCommandEvent& event);
void OnEditParameters(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
#if wxUSE_NEW_GRID
void OnDbGridTable( wxCommandEvent& );
#endif
void CreateDataTable(bool recreate);
void BuildEditorDialog();
void BuildParameterDialog(wxWindow *parent);
@@ -174,6 +180,25 @@ DECLARE_EVENT_TABLE()
}; // DatabaseDemoFrame
#if wxUSE_NEW_GRID
// *************************** DBGridFrame ***************************
class DbGridFrame : public wxFrame
{
public:
bool initialized;
DbGridFrame(wxWindow *parent);
void OnCloseWindow(wxCloseEvent& event);
bool Initialize();
DECLARE_EVENT_TABLE()
};
#endif
// Define a new application type
class DatabaseDemoApp: public wxApp
{