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