]>
git.saurik.com Git - wxWidgets.git/blob - demos/dbbrowse/browsedb.h
1 //---------------------------------------------------------------------------
4 // Author: Mark Johnson, mj10777@gmx.net
6 // Created: 19991127.mj10777
7 // Copyright: (c) Mark Johnson
8 // Licence: wxWindows license
9 //---------------------------------------------------------------------------
10 //-- Zu tun in browsedb.h
11 //---------------------------------------------------------------------------
13 //---------------------------------------------------------------------------
14 // Global structure for holding ODBC connection information
15 //---------------------------------------------------------------------------
16 extern struct DbStuff DbConnectInf
;
18 //---------------------------------------------------------------------------
22 //---------------------------------------------------------------------------
23 // Pointer to the main database connection used in the program. This
24 // pointer would normally be used for doing things as database lookups
25 // for user login names and passwords, getting workstation settings, etc.
26 // ---> IMPORTANT <---
28 // For each database object created which uses this wxDB pointer
29 // connection to the database, when a CommitTrans() or RollBackTrans()
30 // will commit or rollback EVERY object which uses this wxDB pointer.
32 // To allow each table object (those derived from wxTable) to be
33 // individually committed or rolled back, you MUST use a different
34 // instance of wxDB in the constructor of the table. Doing so creates
35 // more overhead, and will use more database connections (some DBs have
36 // connection limits...), so use connections sparringly.
38 // It is recommended that one "main" database connection be created for
39 // the entire program to use for READ-ONLY database accesses, but for each
40 // table object which will do a CommitTrans() or RollbackTrans() that a
41 // new wxDB object be created and used for it.
42 //---------------------------------------------------------------------------
44 wxDbInf
* ct_BrowserDB
;
45 wxColInf
* cl_BrowserDB
;
46 wxString ODBCSource
, UserName
, Password
;
48 //---------------------------------------------------------------------------
49 wxString Temp0
, Temp1
, Temp2
, Temp3
, Temp4
, Temp5
;
51 wxTextCtrl
* p_LogWindow
;
52 wxString s_SqlTyp
[25];
59 //---------------------------------------------------------------------------
62 void Zeiger_auf_NULL(int Art
);
63 bool Initialize(int Quite
);
64 //---------------------------------------------------------------------------
65 bool OnStartDB(int Quite
);
66 bool OnCloseDB(int Quite
);
67 bool OnSelect(wxString tb_Name
,int Quite
);
68 bool OnExecSql(wxString SQLStmt
,int Quite
);
69 bool OnGetNext(int Cols
,int Quite
);
70 wxDbInf
* OnGetCatalog(int Quite
);
71 wxColInf
* OnGetColumns(char *tableName
, int numCols
,int Quite
);
74 //---------------------------------------------------------------------------
75 }; // BrowserDB class definition
76 //---------------------------------------------------------------------------