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