]> git.saurik.com Git - wxWidgets.git/blob - demos/dbbrowse/browsedb.cpp
This is how wxPlotWindow would look like with the
[wxWidgets.git] / demos / dbbrowse / browsedb.cpp
1 //----------------------------------------------------------------------------------------
2 // Name: BrowserDB.h,cpp
3 // Purpose: a wxDB class
4 // Author: Mark Johnson, mj10777@gmx.net
5 // Modified by:
6 // Created: 19991127.mj10777
7 // Copyright: (c) Mark Johnson
8 // Licence: wxWindows license
9 // RCS-ID: $Id$
10 //----------------------------------------------------------------------------------------
11 //-- 1)
12 //----------------------------------------------------------------------------------------
13 //-- all #ifdefs that the whole Project needs. -------------------------------------------
14 //----------------------------------------------------------------------------------------
15 #ifdef __GNUG__
16 #pragma implementation
17 #pragma interface
18 #endif
19 //----------------------------------------------------------------------------------------
20 // For compilers that support precompilation, includes "wx/wx.h".
21 #include "wx/wxprec.h"
22 //----------------------------------------------------------------------------------------
23 #ifdef __BORLANDC__
24 #pragma hdrstop
25 #endif
26 //----------------------------------------------------------------------------------------
27 #ifndef WX_PRECOMP
28 #include "wx/wx.h"
29 #endif
30 //----------------------------------------------------------------------------------------
31 #include "std.h"
32 //----------------------------------------------------------------------------------------
33 // Global structure for holding ODBC connection information
34 // - darf nur einmal im Projekte definiert werden ?? Extra Databasse Klasse ?
35 wxDbConnectInf ConnectInf; // Für DBase
36 //----------------------------------------------------------------------------------------
37 extern WXDLLEXPORT_DATA(wxDbList*) PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */
38 //----------------------------------------------------------------------------------------
39 char *GetExtendedDBErrorMsg(char *ErrFile, int ErrLine)
40 {
41 static wxString msg;
42 wxString tStr;
43 if (ErrFile || ErrLine)
44 {
45 msg += "File: ";
46 msg += ErrFile;
47 msg += " Line: ";
48 tStr.Printf("%d",ErrLine);
49 msg += tStr.GetData();
50 // msg += "\n";
51 }
52 msg.Append ("\nODBC errors:\n");
53 // msg += "\n";
54 /* Scan through each database connection displaying
55 * any ODBC errors that have occured. */
56 wxDbList *pDbList;
57 for (pDbList = PtrBegDbList; pDbList; pDbList = pDbList->PtrNext)
58 {
59 // Skip over any free connections
60 if (pDbList->Free)
61 continue;
62 // Display errors for this connection
63 for (int i = 0; i < DB_MAX_ERROR_HISTORY; i++)
64 {
65 if (pDbList->PtrDb->errorList[i])
66 {
67 msg.Append(pDbList->PtrDb->errorList[i]);
68 if (strcmp(pDbList->PtrDb->errorList[i],"") != 0)
69 msg.Append("\n");
70 }
71 }
72 }
73 msg += "\n";
74 return (char*) (const char*) msg;
75 } // GetExtendedDBErrorMsg
76
77 //----------------------------------------------------------------------------------------
78 BrowserDB::BrowserDB()
79 {
80 Zeiger_auf_NULL(0);
81 ODBCSource = ""; // ODBC data source name (created with ODBC Administrator under Win95/NT)
82 UserName = ""; // database username - must already exist in the data source
83 Password = ""; // password database username
84 OnFillSqlTyp();
85 OnFilldbTyp();
86 } // BrowserDB Constructor
87 //----------------------------------------------------------------------------------------
88 BrowserDB::~BrowserDB()
89 {
90 Zeiger_auf_NULL(1); // Clean up Tables and Databases (Commit, Close und delete)
91 } // BrowserDB destructor
92 //----------------------------------------------------------------------------------------
93 bool BrowserDB::Initialize(int Quiet)
94 {
95 if (!OnStartDB(Quiet))
96 {
97 wxLogMessage(_("\n\n-E-> BrowserDB::OnStartDB(%s) : Failed ! "),ODBCSource.c_str());
98 return FALSE;
99 }
100 return TRUE;
101 } // BrowserDB:Initialize
102 //----------------------------------------------------------------------------------------
103 bool BrowserDB::OnStartDB(int Quiet)
104 {
105 wxStopWatch sw;
106 if (!Quiet)
107 wxLogMessage(_("\n-I-> BrowserDB::OnStartDB(%s) : Begin "),ODBCSource.c_str());
108 if (db_BrowserDB != NULL)
109 {
110 if (!Quiet)
111 wxLogMessage(_("\n-I-> BrowserDB::OnStartDB() : DB is allready open."));
112 return TRUE;
113 }
114 // Initialize the ODBC Environment for Database Operations
115 if (SQLAllocEnv(&ConnectInf.Henv) != SQL_SUCCESS)
116 {
117 if (!Quiet)
118 wxLogMessage(_("\n-E-> BrowserDB::OnStartDB() : DB CONNECTION ERROR : A problem occured while trying to get a connection to the data source"));
119 return FALSE;
120 }
121 //---------------------------------------------------------------------------------------
122 // Connect to datasource
123 //---------------------------------------------------------------------------------------
124 DlgUser *p_Dlg;
125 p_Dlg = new DlgUser(pDoc->p_MainFrame,pDoc,"");
126 p_Dlg->s_DSN = ODBCSource;
127 p_Dlg->s_User = UserName;
128 p_Dlg->s_Password = Password;
129 p_Dlg->OnInit();
130 p_Dlg->Fit();
131
132 bool OK = FALSE;
133 if (p_Dlg->ShowModal() == wxID_OK)
134 {
135 (pDoc->p_DSN+i_Which)->Usr = p_Dlg->s_User;
136 (pDoc->p_DSN+i_Which)->Pas = p_Dlg->s_Password;
137 UserName = p_Dlg->s_User;
138 Password = p_Dlg->s_Password;
139 OK = TRUE;
140 }
141 delete p_Dlg;
142 if (OK)
143 {
144 //--------------------------------------------------------------------------------------
145 strcpy(ConnectInf.Dsn, ODBCSource); // ODBC data source name (created with ODBC Administrator under Win95/NT)
146 strcpy(ConnectInf.Uid, UserName); // database username - must already exist in the data source
147 strcpy(ConnectInf.AuthStr, Password); // password database username
148 db_BrowserDB = wxDbGetConnection(&ConnectInf);
149 // wxLogMessage(">>>%s<<<>>>%s<<<",UserName.c_str(),Password.c_str());
150 if (db_BrowserDB == NULL)
151 {
152 strcpy(ConnectInf.Dsn, "");
153 strcpy(ConnectInf.Uid, "");
154 strcpy(ConnectInf.AuthStr, "");
155 if (!Quiet)
156 {
157 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)"));
158 wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End - Time needed : %ld ms"),ODBCSource.c_str(),sw.Time());
159 }
160 return FALSE;
161 }
162 //--------------------------------------------------------------------------------------
163 if (!Quiet)
164 {
165 Temp1 = db_BrowserDB->GetDatabaseName();
166 Temp2 = db_BrowserDB->GetDataSource();
167 wxLogMessage(_("-I-> BrowserDB::OnGetDataSourceODBC() - DatabaseName(%s) ; DataSource(%s)"),Temp1.c_str(),Temp2.c_str());
168 wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End - Time needed : %ld ms"),ODBCSource.c_str(),sw.Time());
169 }
170 return TRUE;
171 } else return FALSE;
172 }
173 //----------------------------------------------------------------------------------------
174 bool BrowserDB::OnCloseDB(int Quiet)
175 {
176 if (!Quiet)
177 wxLogMessage(_("-I-> BrowserDB::OnCloseDB() : Begin "));
178 if (db_BrowserDB)
179 {
180 db_BrowserDB->Close();
181 wxDbFreeConnection(db_BrowserDB);
182
183 // Free Environment Handle that ODBC uses
184 if (SQLFreeEnv(&ConnectInf.Henv) != SQL_SUCCESS)
185 {
186 // Error freeing environment handle
187 }
188 db_BrowserDB = NULL;
189 }
190 if (!Quiet)
191 wxLogMessage(_("\n-I-> BrowserDB::OnCloseDB() : End "));
192 return TRUE;
193 }
194 //----------------------------------------------------------------------------------------
195 bool BrowserDB::OnGetNext(int Cols,int Quiet)
196 {
197 SDWORD cb;
198 int i_dbDataType;
199 int i=0;
200 char s_temp[1024+1];
201 long l_temp;
202 double f_temp;
203 int AnzError=0;
204 TIMESTAMP_STRUCT t_temp;
205 wxString Temp0;
206 //-----------------------------
207 if (!db_BrowserDB->GetNext())
208 {
209 return FALSE;
210 Temp0.Printf(_("\n-E-> BrowserDB::OnGetNext - ODBC-Error with GetNext \n-E-> "));
211 Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__);
212 wxLogMessage(Temp0);
213 wxMessageBox(Temp0);
214 }
215 else
216 {
217 for (i=0;i<Cols;i++)
218 {
219 strcpy((cl_BrowserDB+i)->tableName,"-E->");
220 i_dbDataType = (cl_BrowserDB->pColFor+i)->i_dbDataType;
221 if (i_dbDataType == 0) // Filter unsupported dbDataTypes
222 {
223 if (((cl_BrowserDB->pColFor+i)->i_sqlDataType == SQL_VARCHAR) || ((cl_BrowserDB->pColFor+i)->i_sqlDataType == SQL_LONGVARCHAR))
224 i_dbDataType = DB_DATA_TYPE_VARCHAR;
225 if ((cl_BrowserDB->pColFor+i)->i_sqlDataType == SQL_C_DATE)
226 i_dbDataType = DB_DATA_TYPE_DATE;
227 if ((cl_BrowserDB->pColFor+i)->i_sqlDataType == SQL_C_BIT)
228 i_dbDataType = DB_DATA_TYPE_INTEGER;
229 if ((cl_BrowserDB->pColFor+i)->i_sqlDataType == SQL_NUMERIC)
230 i_dbDataType = DB_DATA_TYPE_VARCHAR;
231 if ((cl_BrowserDB->pColFor+i)->i_sqlDataType == SQL_REAL)
232 i_dbDataType = DB_DATA_TYPE_FLOAT;
233 }
234 if ((i_dbDataType == DB_DATA_TYPE_INTEGER) && ((cl_BrowserDB->pColFor+i)->i_sqlDataType == SQL_C_DOUBLE))
235 { // DBASE Numeric
236 i_dbDataType = DB_DATA_TYPE_FLOAT;
237 }
238 switch(i_dbDataType)
239 {
240 case DB_DATA_TYPE_VARCHAR:
241 strcpy(s_temp,"");
242 if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_dbDataType,&s_temp,sizeof(s_temp), &cb))
243 {
244 Temp0.Printf(_("\n-E-> BrowserDB::OnGetNext - ODBC-Error with GetNext of >%s<.\n-E-> "),(cl_BrowserDB+i)->tableName);
245 Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__);
246 wxLogMessage(Temp0);
247 }
248 Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,s_temp);
249 strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
250 break;
251 case DB_DATA_TYPE_INTEGER:
252 l_temp = 0;
253 if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_sqlDataType,&l_temp,sizeof(l_temp), &cb))
254 {
255 Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> "));
256 Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__);
257 }
258 else
259 {
260 Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,l_temp);
261 strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
262 }
263 break;
264 case DB_DATA_TYPE_FLOAT:
265 f_temp = 0;
266 if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_sqlDataType,&f_temp,sizeof(f_temp), &cb))
267 {
268 Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> "));
269 Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__);
270 wxMessageBox(Temp0);
271 }
272 else
273 {
274 Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,f_temp);
275 strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
276 }
277 break;
278 case DB_DATA_TYPE_DATE:
279 t_temp.day = t_temp.month = t_temp.year = t_temp.hour = t_temp.minute = t_temp.second = t_temp.fraction = 0;
280 if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB->pColFor+i)->i_sqlDataType,&t_temp,sizeof(t_temp), &cb))
281 {
282 Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> "));
283 Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__);
284 }
285 else
286 {
287 // i_Nation = 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US
288 if (((cl_BrowserDB->pColFor+i)->i_Nation == 0) || // TS YYYY-MM-DD
289 ((cl_BrowserDB->pColFor+i)->i_Nation == 3)) // IT YYYY-MM-DD
290 {
291 Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,t_temp.year,t_temp.month,t_temp.day,
292 t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
293 strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
294 }
295 if (((cl_BrowserDB->pColFor+i)->i_Nation == 1) || // EU DD.MM.YYYY
296 ((cl_BrowserDB->pColFor+i)->i_Nation == 2)) // UK DD/MM/YYYY
297 {
298 Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,t_temp.day,t_temp.month,t_temp.year,
299 t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
300 strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
301 }
302 if ((cl_BrowserDB->pColFor+i)->i_Nation == 3) // US MM/DD/YYYY
303 {
304 Temp0.Printf((cl_BrowserDB->pColFor+i)->s_Field,t_temp.month,t_temp.day,t_temp.year,
305 t_temp.hour, t_temp.minute, t_temp.second, t_temp.fraction);
306 strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
307 }
308 }
309 break;
310 default:
311 AnzError++;
312 if (AnzError <= 100)
313 {
314 Temp0 = (cl_BrowserDB+i)->colName;
315 wxLogMessage(_("-E-> BrowserDB::OnGetNext - DB_DATA_TYPE_?? (%d) in Col(%s)"),(cl_BrowserDB->pColFor+i)->i_dbDataType,Temp0.c_str());
316 }
317 else
318 return TRUE;
319 Temp0.Printf(_("-E-> unknown Format(%d) - sql(%d)"),(cl_BrowserDB->pColFor+i)->i_dbDataType,(cl_BrowserDB->pColFor+i)->i_sqlDataType);
320 strcpy((cl_BrowserDB+i)->tableName,Temp0.c_str());
321 break;
322 };
323 }
324 }
325 // wxLogMessage("-E-> BrowserDB::OnGetNext - End");
326 return TRUE;
327 }
328 //----------------------------------------------------------------------------------------
329 bool BrowserDB::OnSelect(wxString tb_Name, int Quiet)
330 {
331 wxStopWatch sw;
332 wxString SQLStmt;
333 i_Records = 0;
334 //---------------------------------------------------------------------------------------
335 SQLStmt.sprintf("SELECT * FROM %s",tb_Name.c_str());
336 if (!db_BrowserDB->ExecSql((char *)(SQLStmt.GetData())))
337 {
338 Temp0.Printf(_("\n-E-> BrowserDB::OnSelect - ODBC-Error with ExecSql of >%s<.\n-E-> "),tb_Name.c_str());
339 Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__);
340 wxLogMessage(Temp0);
341 wxMessageBox("-E-> BrowserDB::OnSelect - GetData()");
342 return FALSE;
343 }
344 //---------------------------------------------------------------------------------------
345 while (db_BrowserDB->GetNext())
346 {
347 i_Records++;
348 }
349 //---------------------------------------------------------------------------------------
350 if (!db_BrowserDB->ExecSql((char *)(SQLStmt.GetData())))
351 {
352 Temp0.Printf(_("\n-E-> BrowserDB::OnSelect - ODBC-Error with ExecSql of >%s<.\n-E-> "),tb_Name.c_str());
353 Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__);
354 wxLogMessage(Temp0);
355 return FALSE;
356 }
357 //---------------------------------------------------------------------------------------
358 // SetColDefs ( 0,"NAME", DB_DATA_TYPE_VARCHAR, Name, SQL_C_CHAR, sizeof(Name), TRUE, TRUE); // Primary index
359 //---------------------------------------------------------------------------------------
360 if (!Quiet)
361 {
362 wxLogMessage(_("\n-I-> BrowserDB::OnSelect(%s) Records(%d): End - Time needed : %ld ms"),tb_Name.c_str(),i_Records,sw.Time());
363 }
364 return TRUE;
365 }
366 //----------------------------------------------------------------------------------------
367 bool BrowserDB::OnExecSql(wxString SQLStmt, int Quiet)
368 {
369 //---------------------------------------------------------------------------------------
370 if (!db_BrowserDB->ExecSql((char *)(SQLStmt.GetData())))
371 {
372 Temp0.Printf(_("\n-E-> BrowserDB::OnExecSQL - ODBC-Error with ExecSql of >%s<.\n-E-> "),SQLStmt.c_str());
373 Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__);
374 if (!Quiet)
375 wxLogMessage(Temp0);
376 else
377 wxMessageBox("-E-> BrowserDB::OnExecSql - ExecSql()");
378 return FALSE;
379 }
380 if (!Quiet)
381 {
382 // wxLogMessage(_("\n-I-> BrowserDB::OnExecSql(%s) - End - Time needed : %ld ms"),SQLStmt.c_str(),sw.Time());
383 }
384 return TRUE;
385 }
386 //----------------------------------------------------------------------------------------
387 wxDbInf* BrowserDB::OnGetCatalog(int Quiet)
388 {
389 char UName[255];
390 strcpy(UName,UserName);
391 ct_BrowserDB = db_BrowserDB->GetCatalog(UName);
392 return ct_BrowserDB;
393 }
394 //----------------------------------------------------------------------------------------
395 wxDbColInf* BrowserDB::OnGetColumns(char *tableName, int numCols, int Quiet)
396 {
397 char UName[255];
398 int i;
399 strcpy(UName,UserName);
400 cl_BrowserDB = db_BrowserDB->GetColumns(tableName,&numCols,UName);
401 cl_BrowserDB->pColFor = new wxDbColFor[numCols];
402 for (i=0;i<numCols;i++)
403 {
404 (cl_BrowserDB->pColFor+i)->Format(1,(cl_BrowserDB+i)->dbDataType,(cl_BrowserDB+i)->sqlDataType,
405 (cl_BrowserDB+i)->columnSize, (cl_BrowserDB+i)->decimalDigits);
406 }
407 return cl_BrowserDB;
408 }
409 //----------------------------------------------------------------------------------------
410 void BrowserDB::Zeiger_auf_NULL(int Art)
411 {
412 if (Art == 1) // Löschen
413 {
414 if (cl_BrowserDB != NULL)
415 { // Destroy the memory
416 delete [] cl_BrowserDB;
417 }
418 if (ct_BrowserDB != NULL)
419 { // Destroy the memory
420 delete [] ct_BrowserDB;
421 }
422 if (db_BrowserDB != NULL)
423 {
424 db_BrowserDB->CommitTrans();
425 db_BrowserDB->Close();
426 wxDbCloseConnections();
427 delete db_BrowserDB;
428 }
429 }
430 cl_BrowserDB = NULL;
431 ct_BrowserDB = NULL;
432 db_BrowserDB = NULL;
433 p_LogWindow = NULL;
434 }
435 //----------------------------------------------------------------------------------------
436 void BrowserDB::OnFillSqlTyp()
437 {
438 i_SqlTyp[1] = SQL_C_BINARY; s_SqlTyp[1] = "SQL_C_BINARY";
439 i_SqlTyp[2] = SQL_C_BIT; s_SqlTyp[2] = "SQL_C_BIT";
440 i_SqlTyp[3] = SQL_C_BOOKMARK; s_SqlTyp[3] = "SQL_C_BOOKMARK";
441 i_SqlTyp[4] = SQL_C_CHAR; s_SqlTyp[4] = "SQL_C_CHAR";
442 i_SqlTyp[5] = SQL_C_DATE; s_SqlTyp[5] = "SQL_C_DATE";
443 i_SqlTyp[6] = SQL_C_DEFAULT; s_SqlTyp[6] = "SQL_C_DEFAULT";
444 i_SqlTyp[7] = SQL_C_DOUBLE; s_SqlTyp[7] = "SQL_C_DOUBLE";
445 i_SqlTyp[8] = SQL_C_FLOAT; s_SqlTyp[8] = "SQL_C_FLOAT";
446 i_SqlTyp[9] = SQL_C_LONG; s_SqlTyp[9] = "SQL_C_LONG";
447 i_SqlTyp[10] = SQL_C_SHORT; s_SqlTyp[10] = "SQL_C_SHORT";
448 i_SqlTyp[11] = SQL_C_SLONG; s_SqlTyp[11] = "SQL_C_SLONG";
449 i_SqlTyp[12] = SQL_C_SSHORT; s_SqlTyp[12] = "SQL_C_SSHORT";
450 i_SqlTyp[13] = SQL_C_STINYINT; s_SqlTyp[13] = "SQL_C_STINYINT";
451 i_SqlTyp[14] = SQL_C_TIME; s_SqlTyp[14] = "SQL_C_TIME";
452 i_SqlTyp[15] = SQL_C_TIMESTAMP; s_SqlTyp[15] = "SQL_C_TIMESTAMP";
453 i_SqlTyp[16] = SQL_C_TINYINT; s_SqlTyp[16] = "SQL_C_TINYINT";
454 i_SqlTyp[17] = SQL_C_ULONG; s_SqlTyp[17] = "SQL_C_ULONG";
455 i_SqlTyp[18] = SQL_C_USHORT; s_SqlTyp[18] = "SQL_C_USHORT";
456 i_SqlTyp[19] = SQL_C_UTINYINT; s_SqlTyp[19] = "SQL_C_UTINYINT";
457 i_SqlTyp[20] = SQL_VARCHAR; s_SqlTyp[20] = "SQL_VARCHAR";
458 i_SqlTyp[21] = SQL_NUMERIC; s_SqlTyp[21] = "SQL_NUMERIC";
459 i_SqlTyp[22] = SQL_LONGVARCHAR; s_SqlTyp[22] = "SQL_LONGVARCHAR";
460 i_SqlTyp[23] = SQL_REAL; s_SqlTyp[23] = "SQL_REAL";
461 i_SqlTyp[0] = 23; s_SqlTyp[0] = "";
462 }
463 //----------------------------------------------------------------------------------------
464 void BrowserDB::OnFilldbTyp()
465 {
466 i_dbTyp[1] = DB_DATA_TYPE_VARCHAR; s_dbTyp[1] = "DB_DATA_TYPE_VARCHAR";
467 i_dbTyp[2] = DB_DATA_TYPE_INTEGER; s_dbTyp[2] = "DB_DATA_TYPE_INTEGER";
468 i_dbTyp[3] = DB_DATA_TYPE_FLOAT; s_dbTyp[3] = "DB_DATA_TYPE_FLOAT";
469 i_dbTyp[4] = DB_DATA_TYPE_DATE; s_dbTyp[4] = "DB_DATA_TYPE_DATE";
470 i_dbTyp[0] = 4; s_dbTyp[0] = "";
471 }
472 //----------------------------------------------------------------------------------------