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