]> git.saurik.com Git - wxWidgets.git/blame - demos/dbbrowse/browsedb.h
changed meaning of Ctrl-End to be symetrical with Ctrl-Home
[wxWidgets.git] / demos / dbbrowse / browsedb.h
CommitLineData
b5ffecfc
GT
1//---------------------------------------------------------------------------
2// Name: browsedb.h
3// Purpose: a wxDB ;
4// Author: Mark Johnson, mj10777@gmx.net
5// Modified by:
6// Created: 19991127.mj10777
7// Copyright: (c) Mark Johnson
8// Licence: wxWindows license
9//---------------------------------------------------------------------------
10//-- Zu tun in browsedb.h
11//---------------------------------------------------------------------------
12//-- 1)
13//---------------------------------------------------------------------------
14// Global structure for holding ODBC connection information
15//---------------------------------------------------------------------------
16extern struct DbStuff DbConnectInf;
17class mjDoc;
18//---------------------------------------------------------------------------
19class BrowserDB
20{
21 public:
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 <---
27 //
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.
31 //
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.
37 //
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 //---------------------------------------------------------------------------
43 wxDB* db_BrowserDB;
44 wxDbInf* ct_BrowserDB;
45 wxColInf* cl_BrowserDB;
46 wxString ODBCSource, UserName, Password;
47 mjDoc *pDoc;
48 //---------------------------------------------------------------------------
49 wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5;
50 wxString ODBCText;
51 wxTextCtrl* p_LogWindow;
52 wxString s_SqlTyp[25];
53 int i_SqlTyp[25];
54 wxString s_dbTyp[5];
55 int i_dbTyp[5];
56 int i_Which;
57 int i_Records;
58 int i_Cols;
59 //---------------------------------------------------------------------------
60 BrowserDB();
61 ~BrowserDB();
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);
72 void OnFillSqlTyp();
73 void OnFilldbTyp();
74 //---------------------------------------------------------------------------
75}; // BrowserDB class definition
76//---------------------------------------------------------------------------