]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/db.tex
wxTable renamed to wxDbTable
[wxWidgets.git] / docs / latex / wx / db.tex
1 \section{\class{wxDb}}\label{wxdb}
2
3 A wxDb instance is a connection to an ODBC data source which may
4 be opened, closed, and re-opened an unlimited number of times. A
5 database connection allows function to be performed directly on the
6 data source, as well as allowing access to any tables/views defined in
7 the data source to which the user has sufficient privileges.
8
9 \wxheading{Include files}
10
11 <wx/version.h>
12 <wx/iodbc.h>
13 <wx/isqlext.h>
14 <wx/db.h>
15
16 \latexignore{\rtfignore{\wxheading{Members}}}
17 \wxheading{Enumerated types}
18
19 \label{wxdbenumsqllogstate}\docparam{enum {\bf wxDbSqlLogState}}{sqlLogOFF, sqlLogON}
20
21 {\it enum {\bf wxDBMS}}
22
23 These are the databases currently tested and working with these ODBC classes.
24 A call to \helpref{wxDb::Dbms}{wxdbdbms} will return one of these enumerated values listed below.
25
26 \begin{verbatim}
27 dbmsUNIDENTIFIED,
28 dbmsORACLE,
29 dbmsSYBASE_ASA, // Adaptive Server Anywhere
30 dbmsSYBASE_ASE, // Adaptive Server Enterprise
31 dbmsMS_SQL_SERVER,
32 dbmsMY_SQL,
33 dbmsPOSTGRES,
34 dbmsACCESS,
35 dbmsDBASE,
36 dbmsINFORMIX
37 \end{verbatim}
38
39 See the remarks in \helpref{wxDb::Dbms}{wxdbdbms} for exceptions/issues with
40 each of these database engines.
41
42
43 \wxheading{Public member variables}
44
45 \docparam{SWORD {\bf wxDb::cbErrorMsg}}{This member variable is populated as a result of
46 calling \helpref{wxDb::GetNextError}{wxdbgetnexterror}. Contains the count of bytes in the wxDb::errorMsg string.}
47
48 \label{wxdbdbstatus}\docparam{int {\bf wxDb::DB_STATUS}}{The last ODBC error that occured on this data connection. Possible codes are:}
49
50 \begin{verbatim}
51 DB_ERR_GENERAL_WARNING // SqlState = '01000'
52 DB_ERR_DISCONNECT_ERROR // SqlState = '01002'
53 DB_ERR_DATA_TRUNCATED // SqlState = '01004'
54 DB_ERR_PRIV_NOT_REVOKED // SqlState = '01006'
55 DB_ERR_INVALID_CONN_STR_ATTR // SqlState = '01S00'
56 DB_ERR_ERROR_IN_ROW // SqlState = '01S01'
57 DB_ERR_OPTION_VALUE_CHANGED // SqlState = '01S02'
58 DB_ERR_NO_ROWS_UPD_OR_DEL // SqlState = '01S03'
59 DB_ERR_MULTI_ROWS_UPD_OR_DEL // SqlState = '01S04'
60 DB_ERR_WRONG_NO_OF_PARAMS // SqlState = '07001'
61 DB_ERR_DATA_TYPE_ATTR_VIOL // SqlState = '07006'
62 DB_ERR_UNABLE_TO_CONNECT // SqlState = '08001'
63 DB_ERR_CONNECTION_IN_USE // SqlState = '08002'
64 DB_ERR_CONNECTION_NOT_OPEN // SqlState = '08003'
65 DB_ERR_REJECTED_CONNECTION // SqlState = '08004'
66 DB_ERR_CONN_FAIL_IN_TRANS // SqlState = '08007'
67 DB_ERR_COMM_LINK_FAILURE // SqlState = '08S01'
68 DB_ERR_INSERT_VALUE_LIST_MISMATCH // SqlState = '21S01'
69 DB_ERR_DERIVED_TABLE_MISMATCH // SqlState = '21S02'
70 DB_ERR_STRING_RIGHT_TRUNC // SqlState = '22001'
71 DB_ERR_NUMERIC_VALUE_OUT_OF_RNG // SqlState = '22003'
72 DB_ERR_ERROR_IN_ASSIGNMENT // SqlState = '22005'
73 DB_ERR_DATETIME_FLD_OVERFLOW // SqlState = '22008'
74 DB_ERR_DIVIDE_BY_ZERO // SqlState = '22012'
75 DB_ERR_STR_DATA_LENGTH_MISMATCH // SqlState = '22026'
76 DB_ERR_INTEGRITY_CONSTRAINT_VIOL // SqlState = '23000'
77 DB_ERR_INVALID_CURSOR_STATE // SqlState = '24000'
78 DB_ERR_INVALID_TRANS_STATE // SqlState = '25000'
79 DB_ERR_INVALID_AUTH_SPEC // SqlState = '28000'
80 DB_ERR_INVALID_CURSOR_NAME // SqlState = '34000'
81 DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL // SqlState = '37000'
82 DB_ERR_DUPLICATE_CURSOR_NAME // SqlState = '3C000'
83 DB_ERR_SERIALIZATION_FAILURE // SqlState = '40001'
84 DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL2 // SqlState = '42000'
85 DB_ERR_OPERATION_ABORTED // SqlState = '70100'
86 DB_ERR_UNSUPPORTED_FUNCTION // SqlState = 'IM001'
87 DB_ERR_NO_DATA_SOURCE // SqlState = 'IM002'
88 DB_ERR_DRIVER_LOAD_ERROR // SqlState = 'IM003'
89 DB_ERR_SQLALLOCENV_FAILED // SqlState = 'IM004'
90 DB_ERR_SQLALLOCCONNECT_FAILED // SqlState = 'IM005'
91 DB_ERR_SQLSETCONNECTOPTION_FAILED // SqlState = 'IM006'
92 DB_ERR_NO_DATA_SOURCE_DLG_PROHIB // SqlState = 'IM007'
93 DB_ERR_DIALOG_FAILED // SqlState = 'IM008'
94 DB_ERR_UNABLE_TO_LOAD_TRANSLATION_DLL // SqlState = 'IM009'
95 DB_ERR_DATA_SOURCE_NAME_TOO_LONG // SqlState = 'IM010'
96 DB_ERR_DRIVER_NAME_TOO_LONG // SqlState = 'IM011'
97 DB_ERR_DRIVER_KEYWORD_SYNTAX_ERROR // SqlState = 'IM012'
98 DB_ERR_TRACE_FILE_ERROR // SqlState = 'IM013'
99 DB_ERR_TABLE_OR_VIEW_ALREADY_EXISTS // SqlState = 'S0001'
100 DB_ERR_TABLE_NOT_FOUND // SqlState = 'S0002'
101 DB_ERR_INDEX_ALREADY_EXISTS // SqlState = 'S0011'
102 DB_ERR_INDEX_NOT_FOUND // SqlState = 'S0012'
103 DB_ERR_COLUMN_ALREADY_EXISTS // SqlState = 'S0021'
104 DB_ERR_COLUMN_NOT_FOUND // SqlState = 'S0022'
105 DB_ERR_NO_DEFAULT_FOR_COLUMN // SqlState = 'S0023'
106 DB_ERR_GENERAL_ERROR // SqlState = 'S1000'
107 DB_ERR_MEMORY_ALLOCATION_FAILURE // SqlState = 'S1001'
108 DB_ERR_INVALID_COLUMN_NUMBER // SqlState = 'S1002'
109 DB_ERR_PROGRAM_TYPE_OUT_OF_RANGE // SqlState = 'S1003'
110 DB_ERR_SQL_DATA_TYPE_OUT_OF_RANGE // SqlState = 'S1004'
111 DB_ERR_OPERATION_CANCELLED // SqlState = 'S1008'
112 DB_ERR_INVALID_ARGUMENT_VALUE // SqlState = 'S1009'
113 DB_ERR_FUNCTION_SEQUENCE_ERROR // SqlState = 'S1010'
114 DB_ERR_OPERATION_INVALID_AT_THIS_TIME // SqlState = 'S1011'
115 DB_ERR_INVALID_TRANS_OPERATION_CODE // SqlState = 'S1012'
116 DB_ERR_NO_CURSOR_NAME_AVAIL // SqlState = 'S1015'
117 DB_ERR_INVALID_STR_OR_BUF_LEN // SqlState = 'S1090'
118 DB_ERR_DESCRIPTOR_TYPE_OUT_OF_RANGE // SqlState = 'S1091'
119 DB_ERR_OPTION_TYPE_OUT_OF_RANGE // SqlState = 'S1092'
120 DB_ERR_INVALID_PARAM_NO // SqlState = 'S1093'
121 DB_ERR_INVALID_SCALE_VALUE // SqlState = 'S1094'
122 DB_ERR_FUNCTION_TYPE_OUT_OF_RANGE // SqlState = 'S1095'
123 DB_ERR_INF_TYPE_OUT_OF_RANGE // SqlState = 'S1096'
124 DB_ERR_COLUMN_TYPE_OUT_OF_RANGE // SqlState = 'S1097'
125 DB_ERR_SCOPE_TYPE_OUT_OF_RANGE // SqlState = 'S1098'
126 DB_ERR_NULLABLE_TYPE_OUT_OF_RANGE // SqlState = 'S1099'
127 DB_ERR_UNIQUENESS_OPTION_TYPE_OUT_OF_RANGE // SqlState = 'S1100'
128 DB_ERR_ACCURACY_OPTION_TYPE_OUT_OF_RANGE // SqlState = 'S1101'
129 DB_ERR_DIRECTION_OPTION_OUT_OF_RANGE // SqlState = 'S1103'
130 DB_ERR_INVALID_PRECISION_VALUE // SqlState = 'S1104'
131 DB_ERR_INVALID_PARAM_TYPE // SqlState = 'S1105'
132 DB_ERR_FETCH_TYPE_OUT_OF_RANGE // SqlState = 'S1106'
133 DB_ERR_ROW_VALUE_OUT_OF_RANGE // SqlState = 'S1107'
134 DB_ERR_CONCURRENCY_OPTION_OUT_OF_RANGE // SqlState = 'S1108'
135 DB_ERR_INVALID_CURSOR_POSITION // SqlState = 'S1109'
136 DB_ERR_INVALID_DRIVER_COMPLETION // SqlState = 'S1110'
137 DB_ERR_INVALID_BOOKMARK_VALUE // SqlState = 'S1111'
138 DB_ERR_DRIVER_NOT_CAPABLE // SqlState = 'S1C00'
139 DB_ERR_TIMEOUT_EXPIRED // SqlState = 'S1T00'
140 \end{verbatim}
141
142
143 \docparam{struct {\bf wxDb::dbInf}}{This structure is internal to the wxDb class and contains
144 details of the ODBC datasource that the current instance of the wxDb is connected to
145 in its members. When the data source is opened, all of the information contained in
146 the dbInf structure is queried from the data source. This information is used almost
147 exclusively within the ODBC class library. Where there is a need for this information
148 outside of the class library a member function such as wxTable::IsCursorClosedOnCommit()
149 has been added for ease of use.}
150
151 \begin{verbatim}
152 char dbmsName[40] - Name of the dbms product
153 char dbmsVer[64] - Version # of the dbms product
154 char driverName[40] - Driver name
155 char odbcVer[60] - ODBC version of the driver
156 char drvMgrOdbcVer[60] - ODBC version of the driver manager
157 char driverVer[60] - Driver version
158 char serverName[80] - Server Name, typically a connect string
159 char databaseName[128] - Database filename
160 char outerJoins[2] - Does datasource support outer joins
161 char procedureSupport[2] - Does datasource support stored procedures
162 UWORD maxConnections - Maximum # of connections datasource supports
163 UWORD maxStmts - Maximum # of HSTMTs per HDBC
164 UWORD apiConfLvl - ODBC API conformance level
165 UWORD cliConfLvl - Is datasource SAG compliant
166 UWORD sqlConfLvl - SQL conformance level
167 UWORD cursorCommitBehavior - How cursors are affected on db commit
168 UWORD cursorRollbackBehavior - How cursors are affected on db rollback
169 UWORD supportNotNullClause - Does datasource support NOT NULL clause
170 char supportIEF[2] - Integrity Enhancement Facility (Ref. Integrity)
171 UDWORD txnIsolation - Transaction isolation level supported by driver
172 UDWORD txnIsolationOptions - Transaction isolation level options available
173 UDWORD fetchDirections - Fetch directions supported
174 UDWORD lockTypes - Lock types supported in SQLSetPos
175 UDWORD posOperations - Position operations supported in SQLSetPos
176 UDWORD posStmts - Position statements supported
177 UDWORD scrollConcurrency - Scrollable cursor concurrency options supported
178 UDWORD scrollOptions - Scrollable cursor options supported
179 UDWORD staticSensitivity - Can additions/deletions/updates be detected
180 UWORD txnCapable - Indicates if datasource supports transactions
181 UDWORD loginTimeout - Number seconds to wait for a login request
182 \end{verbatim}
183
184 \docparam{char {\bf wxDb::errorList}[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN]}{The last n ODBC errors that have occured on this database connection.}
185
186 \docparam{char {\bf wxDb::errorMsg}[SQL_MAX_MESSAGE_LENGTH]}{This member variable is populated as a result of calling \helpref{wxDb::GetNextError}{wxdbgetnexterror}. It contains the ODBC error message text.}
187
188 \docparam{SDWORD {\bf wxDb::nativeError}}{Set by wxDb::DispAllErrors, wxDb::GetNextError, and wxDb::DispNextError. It contains the datasource-specific error code returned by the datasource to the ODBC driver. Used for reporting ODBC errors.}
189
190 \docparam{wxChar {\bf wxDb::sqlState}[20]}{Set by wxDb::TranslateSqlState(). Indicates the error state after a failed ODBC operation. Used for reporting ODBC errors.}
191
192 \docparam{unsigned int {\bf nTables}}{Number of wxDbTable objects connected to this wxDb instance. {\bf FOR INTERNAL USE ONLY} by wxDbTable!!!}
193
194 {\it wxDbSqlTypeInfo {\bf typeInfVarchar}}
195
196 {\it wxDbSqlTypeInfo {\bf typeInfInteger}}
197
198 {\it wxDbSqlTypeInfo {\bf typeInfFloat}}
199
200 {\it wxDbSqlTypeInfo {\bf typeInfDate}}
201
202 \begin{indented}{1cm}
203 The four wxDbSqlTypeInfo member variables listed above contain information about logical data types VARCHAR, INTEGER, FLOAT and DATE.
204
205 This information is obtained from the ODBC driver by use of the ::SQLGetTypeInfo() function. The key piece of information is the type name the datasource uses for each logical data type. e.g. VARCHAR; Oracle calls it VARCHAR2.
206 \end{indented}
207
208 \wxheading{Remarks}
209
210 Default cursor scrolling is defined by wxODBC_FWD_ONLY_CURSORS in setup.h
211 when the wxWindows library is built. This behavior can be overridden when
212 an instance of a wxDb is created (see \helpref{wxDb constructor}{wxdbconstr}
213
214 \wxheading{See also}
215
216 \helpref{wxDbColFor}{wxdbcolfor}, \helpref{wxDbColInf}{wxdbcolinf}, \helpref{wxDbTable}{wxdbtable}, \helpref{wxDbTableInf}{wxdbtableinf}, \helpref{wxDbInf}{wxdbinf}
217
218
219
220 \membersection{wxDb::wxDb}\label{wxdbconstr}
221
222 \func{}{wxDb}{\void}
223
224 Default constructor.
225
226 \func{}{wxDb}{\param{HENV\& }{aHenv}}
227
228 Constructor, used to create an ODBC connection to a data source.
229
230 \wxheading{Parameters}
231
232 \docparam{aHenv}{Environment handle defined in iODBC}
233
234 \wxheading{Remarks}
235
236 This is the constructor for the wxDb class. The wxDb object must
237 be created and opened before any database activity can occur.
238
239 \wxheading{Example}
240 \begin{verbatim}
241 wxDbConnectInf ConnectInf;
242 ....Set values for member variables of ConnectInf here
243
244 wxDb sampleDB(ConnectInf.Henv);
245 if (!sampleDB.Open(ConnectInf.Dsn, ConnectInf.Uid, ConnectInf.AuthStr))
246 {
247 // Error opening data source
248 }
249 \end{verbatim}
250
251
252 \membersection{wxDb::Catalog}\label{wxdbcatalog}
253
254 \func{bool}{Catalog}{\param{char *}{ userID}, \param{char *}{fileName = SQL_CATALOG_FILENAME}}
255
256 Allows a data "dictionary" of the data source to be created, dumping pertinent information about all data tables to which the user specified in userID has access.
257
258 \wxheading{Parameters}
259
260 \docparam{userID}{Database user name to use in accessing the database. All tables to which this user has rights will be evaluated in the catalog.}
261
262 \docparam{fileName}{OPTIONAL argument. Name of the text file to create and write the DB catalog to.}
263
264 \wxheading{Return value}
265
266 Returns TRUE if the catalog request was successful, of FALSE if there was some reason the catalog could not be generated
267
268 \wxheading{Example}
269 \begin{verbatim}
270 ============== ============== ================ ========= =======
271 TABLE NAME COLUMN NAME DATA TYPE PRECISION LENGTH
272 ============== ============== ================ ========= =======
273 EMPLOYEE RECID (0008)NUMBER 15 8
274 EMPLOYEE USER_ID (0012)VARCHAR2 13 13
275 EMPLOYEE FULL_NAME (0012)VARCHAR2 26 26
276 EMPLOYEE PASSWORD (0012)VARCHAR2 26 26
277 EMPLOYEE START_DATE (0011)DATE 19 16
278 \end{verbatim}
279
280
281 \membersection{wxDb::Close}\label{wxdbclose}
282
283 \func{void}{Close}{\void}
284
285 Closes the database connection.
286
287 \wxheading{Remarks}
288
289 At the end of your program, when you have finished all of your database work, you must close the ODBC connection to the data source. There are actually four steps involved in doing this as illustrated in the example.
290
291 Any wxTable instances which use this connection must be deleted before closing the database connection.
292
293 \wxheading{Example}
294 \begin{verbatim}
295 // Commit any open transactions on the data source
296 sampleDB.CommitTrans();
297
298 // Delete any remaining wxTable objects allocated with new
299 delete parts;
300
301 // Close the wxDb connection when finished with it
302 sampleDB.Close();
303
304 // Free Environment Handle that ODBC uses
305 if (SQLFreeEnv(Db.Henv) != SQL_SUCCESS)
306 {
307 // Error freeing environment handle
308 }
309 \end{verbatim}
310
311
312 \membersection{wxDb::CommitTrans}\label{wxdbcommittrans}
313
314 \func{bool}{CommitTrans}{\void}
315
316 Permanently "commits" changes (insertions/deletions/updates) to the database.
317
318 \wxheading{Return value}
319
320 Returns TRUE if the commit was successful, or FALSE if the commit failed.
321
322 \wxheading{Remarks}
323
324 Transactions begin implicitly as soon as you make a change to the database. At any time thereafter, you can save your work to the database ("Commit") or roll back all of your changes ("Rollback"). Calling this member function commits all open transactions on this ODBC connection.
325
326 \wxheading{Special Note : {\it Cursors} }
327
328 \normalbox{It is important to understand that different database/ODBC driver combinations handle
329 transactions differently. One thing in particular that you must pay attention to is
330 cursors, in regard to transactions. Cursors are what allow you to scroll through
331 records forward and backward and to manipulate records as you scroll through them.
332 When you issue a query, a cursor is created behind the scenes. The cursor keeps track
333 of the query and keeps track of the current record pointer. After you commit or
334 rollback a transaction, the cursor may be closed automatically. This means you must
335 requery the data source before you can perform any additional work against the wxTable
336 object. This is only necessary however if the data source closes the cursor after a
337 commit or rollback. Use the wxTable::IsCursorClosedOnCommit() member function to
338 determine the data source's transaction behavior. Note, it would be very inefficient
339 to just assume the data source closes the cursor and always requery. This could put
340 a significant, unnecessary load on data sources that leave the cursors open after a
341 transaction.}
342
343
344 \membersection{wxDb::CreateView}\label{wxdbcreateviews}
345
346 \func{bool}{CreateView}{\param{char *}{ viewName}, \param{char *}{ colList}, \param{char *}{pSqlStmt}}
347
348 Creates a SQL VIEW.
349
350 \wxheading{Parameters}
351
352 \docparam{viewName}{The name of the view. e.g. PARTS_V}
353 \docparam{colList}{{\it OPTIONAL} Pass in a comma delimited list of column names if you
354 wish to explicitly name each column in the result set. If not desired, pass in an
355 empty string.}
356 \docparam{pSqlStmt}{Pointer to the select statement portion of the CREATE VIEW statement.
357 Must be a complete, valid SQL SELECT statement.}
358
359 \wxheading{Remarks}
360
361 A 'view' is a logical table that derives columns from one or more other tables or views. Once the view is created, it can be queried exactly like any other table in the database.
362
363 NOTE: Views are not available with all datasources. Oracle is one example of a datasouce which does support views.
364
365 \wxheading{Example}
366 \begin{verbatim}
367 // Incomplete code sample
368 db.CreateView("PARTS_SD1", "PN, PD, QTY",
369 "SELECT PART_NO, PART_DESC, QTY_ON_HAND * 1.1 FROM PARTS WHERE STORAGE_DEVICE = 1");
370
371 // PARTS_SD1 can now be queried just as if it were a data table.
372 // e.g. SELECT PN, PD, QTY FROM PARTS_SD1
373 \end{verbatim}
374
375
376 \membersection{wxDb::DispAllErrors}\label{wxdbdispallerrors}
377
378 \func{bool}{DispAllErrors}{\param{HENV}{ aHenv}, {\param}{HDBC}{ aHdbc = SQL_NULL_HDBC}, {\param}{HSTMT}{ aHstmt = SQL_NULL_HSTMT}}
379
380 Logs all database errors that occurred as a result of the last executed database command. This logging also includes debug logging when compiled in debug mode via \helpref{wxLogDebug}{wxlogdebug}. If logging is turned on via \helpref{wxDb::SetSqlLogging}{wxdbsetsqllogging}, then an entry is also logged to the defined log file.
381
382 \wxheading{Parameters}
383
384 \docparam{aHenv}{A handle to the ODBC environment.}
385 \docparam{aHdbc}{A handle to the ODBC connection. Pass this in if the ODBC function call that
386 erred out required a hdbc or hstmt argument.}
387 \docparam{AHstmt}{A handle to the ODBC statement being executed against. Pass this in if the
388 ODBC function call that erred out required a hstmt argument.}
389
390 \wxheading{Remarks}
391
392 This member function will display all of the ODBC error messages for the last ODBC function call that was made. Normally used internally within the ODBC class library. Would be used externally if calling ODBC functions directly (i.e. SQLFreeEnv()).
393
394 \wxheading{See also}
395
396 \helpref{wxDb::SetSqlLogging}{wxdbsetsqllogging}, \helpref{wxDbSqlLog}{wxdbsqllog}
397
398 \wxheading{Example}
399 \begin{verbatim}
400 if (SQLExecDirect(hstmt, (UCHAR FAR *) pSqlStmt, SQL_NTS) != SQL_SUCCESS)
401 // Display all ODBC errors for this stmt
402 return(db.DispAllErrors(db.henv, db.hdbc, hstmt));
403 \end{verbatim}
404
405
406 \membersection{wxDb::DispNextError}\label{wxdbdispnexterror}
407
408 \func{void}{DispNextError}{\void}
409
410 \wxheading{Remarks}
411
412 This function is normally used internally within the ODBC class library.
413 It could be used externally if calling ODBC functions directly. This
414 function works in conjunction with \helpref{wxDb::GetNextError}{wxdbgetnexterror} when errors (or
415 sometimes informational messages) returned from ODBC need to be analyzed
416 rather than simply displaying them as an error. GetNextError() retrieves
417 the next ODBC error from the ODBC error queue. The wxDb member variables
418 "sqlState", "nativeError" and "errorMsg" could then be evaluated. To
419 display the error retrieved, DispNextError() could then be called.
420 The combination of GetNextError() and DispNextError() can be used to
421 iteratively step through the errors returned from ODBC evaluating each
422 one in context and displaying the ones you choose.
423
424 \wxheading{Example}
425 \begin{verbatim}
426 // Drop the table before attempting to create it
427 sprintf(sqlStmt, "DROP TABLE %s", tableName);
428 // Execute the drop table statement
429 if (SQLExecDirect(hstmt,(UCHAR FAR *)sqlStmt,SQL_NTS) != SQL_SUCCESS)
430 {
431 // Check for sqlState = S0002, "Table or view not found".
432 // Ignore this error, bomb out on any other error.
433 pDb->GetNextError(henv, hdbc, hstmt);
434 if (strcmp(pDb->sqlState, "S0002"))
435 {
436 pDb->DispNextError(); // Displayed error retrieved
437 pDb->DispAllErrors(henv, hdbc, hstmt); // Display all other errors, if any
438 pDb->RollbackTrans(); // Rollback the transaction
439 CloseCursor(); // Close the cursor
440 return(FALSE); // Return Failure
441 }
442 }
443 \end{verbatim}
444
445
446 \membersection{wxDb::DropView}\label{wxdbdropview}
447
448 \func{bool}{DropView}{\param{const char *}{viewName}}
449
450 Drops the data table view named in 'viewName'.
451
452 \wxheading{Parameters}
453
454 \docparam{viewName}{Name of the view to be dropped.}
455
456 \wxheading{Remarks}
457
458 If the view does not exist, this function will return TRUE. Note that views are not supported with all data soruces.
459
460
461 \membersection{wxDb::ExecSql}\label{wxdbexecsql}
462
463 \func{bool}{ExecSql}{\param{char *}{pSqlStmt}}
464
465 Allows a native SQL command to be executed directly against the datasource. In addition to being able to run any standard SQL command, use of this function allows a user to (potentially) utilize features specific to the datasource they are connected to that may not be available through ODBC. The ODBC driver will pass the specified command directly to the datasource.
466
467 \wxheading{Parameters}
468
469 \docparam{pSqlStmt}{Pointer to the SQL statement to be executed.}
470
471 \wxheading{Remarks}
472
473 This member extends the wxDb class and allows you to build and execute ANY VALID
474 SQL statement against the data source. This allows you to extend the class
475 library by being able to issue any SQL statement that the data source is capable
476 of processing.
477
478 \wxheading{See also}
479
480 \helpref{wxDb::GetData}{wxdbgetdata}, \helpref{wxDb::GetNext}{wxdbgetnext}
481
482
483 \membersection{wxDb::FwdOnlyCursors}\label{wxdbfwdonlycursors}
484
485 \func{bool}{FwdOnlyCursors}{\void}
486
487 Indicates whether this connection to the datasource only allows forward scrolling cursors or not. This state is set at connection creation time.
488
489 \wxheading{See also}
490
491 \helpref{wxDb::wxDb}{wxdbconstruct}, \helpref{wxDbGetConnection}{wxdbgetconnection}
492
493
494 \membersection{wxDb::GetCatalog}\label{wxdbgetcatalog}
495
496 \func{wxDbInf *}{GetCatalog}{\param{char *}{userID}}
497
498 Returns a wxDbInf pointer that points to the catalog(data source) name, schema, number of tables accessible to the current user, and a wxDbTableInf pointer to all data pertaining to all tables in the users catalog.
499
500 \wxheading{Parameters}
501
502 \docparam{userID}{Owner of the table. Specify a userID when the datasource you are connected
503 to allows multiple unique tables with the same name to be owned by different users. {\it userID}
504 is evaluated as follows:}
505
506 \begin{verbatim}
507 userID == NULL ... UserID is ignored (DEFAULT)
508 userID == "" ... UserID set equal to 'this->uid'
509 userID != "" ... UserID set equal to 'userID'
510 \end{verbatim}
511
512 \wxheading{Remarks}
513
514 The returned catalog will only contain catalog entries for tables to which the user specified in 'userID' has sufficient privileges. If no user is specified (NULL passed in), a catalog pertaining to all tables in the datasource accessible via this connection will be returned.
515
516
517 \membersection{wxDb::GetColumnCount}\label{wxdbgetcolumncount}
518
519 \func{int}{GetColumnCount}{\param{char *}{tableName}, \param{const char *}{userID}}
520
521 \wxheading{Parameters}
522
523 \docparam{tableName}{A table name you wish to obtain column information about.}
524 \docparam{userID}{Name of the user that owns the table(s). Required for some datasources for
525 situations where there may be multiple tables with the same name in the datasource, but owned
526 by different users. {\it userID} is evaluated in the following manner:}
527
528 \begin{verbatim}
529 userID == NULL ... UserID is ignored (DEFAULT)
530 userID == "" ... UserID set equal to 'this->uid'
531 userID != "" ... UserID set equal to 'userID'
532 \end{verbatim}
533
534 \wxheading{Return value}
535
536 Returns a count of how many columns are in the specified table. If an error occurs retrieving the number of columns the function will return a -1.
537
538
539 \membersection{wxDb::GetColumns}\label{wxdbgetcolumns}
540
541 \func{wxDbColInf *}{GetColumns}{\param{char *}{tableName}, \param{int *}{numCols}, \param{const char *}{userID=NULL}}
542
543 \func{wxDbColInf *}{GetColumns}{\param{char *}{tableName[]}, \param{const char *}{userID}}
544
545 \wxheading{Parameters}
546
547 \docparam{tableName}{A table name you wish to obtain column information about.}
548 \docparam{tableName[]}{An array of pointers to table names you wish to obtain column information about.
549 The last element of this array must be a NULL string.}
550 \docparam{numCols}{A pointer to a integer which will hold a count of the number
551 of columns returned by this function}
552 \docparam{userID}{Name of the user that owns the table(s). Required for some datasources for
553 situations where there may be multiple tables with the same name in the datasource, but owned
554 by different users. {\it userID} is evaluated in the following manner:}
555
556 \begin{verbatim}
557 userID == NULL ... UserID is ignored (DEFAULT)
558 userID == "" ... UserID set equal to 'this->uid'
559 userID != "" ... UserID set equal to 'userID'
560 \end{verbatim}
561
562 \wxheading{Return value}
563
564 This function returns an array of wxDbColInf structures. This allows you to obtain
565 information regarding the columns of your table(s). If no columns were found, or
566 an error occured, this pointer will be zero (null).
567
568 THE CALLING FUNCTION IS RESPONSIBLE FOR DELETING THE {\it wxDbColInf} MEMORY WHEN IT IS
569 FINISHED WITH IT.
570
571 \normalbox{ALL column bindings associated with this wxDb instance are unbound
572 by this function. This function should use its own wxDb instance
573 to avoid undesired unbinding of columns.}
574
575 \wxheading{See also}
576
577 \helpref{wxDbColInf}{wxdbcolinf}
578
579 \wxheading{Example}
580 \begin{verbatim}
581 char *tableList[] = {"PARTS", 0};
582 wxDbColInf *colInf = pDb->GetColumns(tableList);
583 if (colInf)
584 {
585 // Use the column inf
586 .......
587 // Destroy the memory
588 delete [] colInf;
589 }
590 \end{verbatim}
591
592
593 \membersection{wxDb::GetData}\label{wxdbgetdata}
594
595 \func{bool}{GetData}{\param{UWORD}{ colNo}, \param{SWORD}{ cType}, \param{PTR}{ pData}, \param{SDWORD}{ maxLen}, \param{SDWORD FAR *}{ cbReturned} }
596
597 Used to retrieve result set data without binding column values to memory variables (i.e. not using a wxDbTable instance to access table data).
598
599 \wxheading{Parameters}
600
601 \docparam{colNo}{Ordinal number of column in the result set to be returned.}
602 \docparam{cType}{The C data type that is to be returned.}
603 \docparam{pData}{Memory buffer which will hold the data returned by the call to this function.}
604 \docparam{maxLen}{Maximum size of the buffer that will hold the returned value.}
605 \docparam{cbReturned}{Pointer to the buffer containing the length of the actual data returned. If this value comes back as SQL_NULL_DATA, then the GetData() call has failed.}
606
607 \wxheading{See also}
608
609 \helpref{wxDb::GetNext}{wxdbgetnext}, \helpref{wxDb::ExecSql}{wxdbexecsql}
610
611 \wxheading{Example}
612 \begin{verbatim}
613 SDWORD cb;
614 ULONG reqQty;
615 wxString sqlStmt;
616 sqlStmt = "SELECT SUM(REQUIRED_QTY - PICKED_QTY) FROM ORDER_TABLE WHERE PART_RECID = 1450 AND REQUIRED_QTY > PICKED_QTY";
617
618 // Perform the query
619 if (!pDb->ExecSql(sqlStmt.c_str()))
620 {
621 // ERROR
622 return(0);
623 }
624
625 // Request the first row of the result set
626 if (!pDb->GetNext())
627 {
628 // ERROR
629 return(0);
630 }
631
632 Read column #1 of this row of the result set and store the value in 'reqQty'
633 if (!pDb->GetData(1, SQL_C_ULONG, &reqQty, 0, &cb))
634 {
635 // ERROR
636 return(0);
637 }
638
639 // Check for a NULL result
640 if (cb == SQL_NULL_DATA)
641 return(0);
642 \end{verbatim}
643
644 \wxheading{Remarks}
645
646 When requesting multiple columns to be returned from the result set (for example, the SQL query
647 requested 3 columns be returned), the calls to GetData must request the columns in ordinal
648 sequence (1,2,3 or 1,3 or 2,3).
649
650
651 \membersection{wxDb::GetDatabaseName}\label{wxdbgetdatabasename}
652
653 \func{char *}{GetDatabaseName}{\void}
654
655 Returns the name of the database engine.
656
657
658 \membersection{wxDb::GetDataSource}\label{wxdbgetdatasource}
659
660 \func{char *}{GetDataSource}{\void}
661
662 Returns the ODBC datasource name.
663
664
665 \membersection{wxDb::GetHDBC}\label{wxdbgethdbc}
666
667 \func{HDBC}{GetHDBC}{\void}
668
669 Returns the ODBC handle to the database connection.
670
671
672 \membersection{wxDb::GetHENV}\label{wxdbgethenv}
673
674 \func{HENV}{GetHENV}{\void}
675
676 Returns the ODBC environment handle.
677
678
679 \membersection{wxDb::GetHSTMT}\label{wxdbgethstmt}
680
681 \func{HSTMT}{GetHSTMT}{\void}
682
683 Returns the ODBC statement handle associated with this database connection.
684
685
686 \membersection{wxDb::GetKeyFields}\label{wxdbgetkeyfields}
687
688 \func{int}{GetKeyFields}{\param{char *}{tableName}, \param{wxDbColInf *}{colInf}, \param{int}{nocols}}
689
690 Used to determine which columns are members of primary or non-primary indexes on the specified table. If a column is a member of a foreign key for some other table, that information is detected also.
691
692 This function is primarily for use by the wxDb::GetColumns() function, but may be called if desired from the client application.
693
694 \wxheading{Parameters}
695
696 \docparam{tableName}{Name of the table for which the columns will be evaluated as to their inclusion in any indexes.}
697 \docparam{colInf}{Data structure containing the column definitions (obtained with wxDb::GetColumns()). This function populates the PkCol, PkTableName, and FkTableName members of the colInf structure.}
698 \docparam{nocols}{Number of columns defined in the instance of colInf.}
699
700 \wxheading{Return value}
701
702 Currently always returns TRUE.
703
704 \wxheading{See also}
705
706 \helpref{wxDbColInf}{wxdbcolinf}, \helpref{wxDb::GetColumns}{wxdbgetcolumns}
707
708
709 \membersection{wxDb::GetNext}\label{wxdbgetnext}
710
711 \func{HSTMT}{GetNext}{\void}
712
713 Requests the next row in the result set obtained by issueing a query through a direct request using wxDb::ExecSql().
714
715 \wxheading{See also}
716
717 \helpref{wxDb::ExecSql}{wxdbexecsql}, \helpref{wxDb::GetData}{wxdbgetdata}
718
719
720 \membersection{wxDb::GetNextError}\label{wxdbgetnexterror}
721
722 \func{bool}{GetNextError}{\param{HENV}{ aHenv}, \param{HDBC}{ aHdbc = SQL_NULL_HDBC}, \param{HSTMT}{ aHstmt = SQL_NULL_HSTMT}}
723
724 \wxheading{Parameters}
725
726 \docparam{aHenv}{A handle to the ODBC environment.}
727 \docparam{aHdbc}{A handle to the ODBC connection. Pass this in if the ODBC function call that
728 erred out required a hdbc or hstmt argument.}
729 \docparam{AHstmt}{A handle to the ODBC statement being executed against. Pass this in if the
730 ODBC function call that erred out requires a hstmt argument.}
731
732 \wxheading{See also}
733
734 \helpref{wxDb::DispNextError}{wxdbdispnexterror}, \helpref{wxDb::DispAllErrors}{wxdbdispallerrors}
735
736 \wxheading{Example}
737 \begin{verbatim}
738 if (SQLExecDirect(hstmt, (UCHAR FAR *) pSqlStmt, SQL_NTS) != SQL_SUCCESS)
739 {
740 // Display all ODBC errors for this stmt
741 return(db.DispAllErrors(db.henv, db.hdbc, hstmt));
742 }
743 \end{verbatim}
744
745
746 \membersection{wxDb::GetPassword}\label{wxdbgetpassword}
747
748 \func{char *}{GetPassword}{\void}
749
750 Returns the password used to connect to the datasource.
751
752
753 \membersection{wxDb::GetTableCount}\label{wxdbgettablecount}
754
755 \func{int}{GetTableCount}{\void}
756
757 Returns the number of wxDbTable() instances currently using this data source connection.
758
759
760 \membersection{wxDb::GetUsername}\label{wxdbgetusername}
761
762 \func{char *}{GetUsername}{\void}
763
764 Returns the user name used to access the datasource.
765
766
767 \membersection{wxDb::Grant}\label{wxdbgrant}
768
769 \func{bool}{Grant}{\param{int}{ privileges}, \param{char *}{tableName}, \param{char *}{userList = "PUBLIC"}}
770
771 Use this member function to GRANT privileges to users for accessing tables in the datasource.
772
773 \wxheading{Parameters}
774
775 \docparam{privileges}{Use this argument to select which privileges you want to grant. Pass
776 DB_GRANT_ALL to grant all privileges. To grant individual privileges pass
777 one or more of the following OR'd together:}
778 \begin{verbatim}
779 DB_GRANT_SELECT = 1
780 DB_GRANT_INSERT = 2
781 DB_GRANT_UPDATE = 4
782 DB_GRANT_DELETE = 8
783 DB_GRANT_ALL = DB_GRANT_SELECT | DB_GRANT_INSERT |
784 DB_GRANT_UPDATE | DB_GRANT_DELETE
785 \end{verbatim}
786 \docparam{tableName}{The name of the table you wish to grant privileges on.}
787 \docparam{userList}{A comma delimited list of users to grant the privileges to. If this argument is not
788 passed in, the privileges will be given to the general PUBLIC.}
789
790 \wxheading{Remarks}
791
792 Some databases require user names to be specified in all capital letters (i.e. Oracle). This function does not automatically capitalize the user names passed in the comma-separated list. This is the responsibility of the calling routine.
793
794 \wxheading{Example}
795 \begin{verbatim}
796 db.Grant(DB_GRANT_SELECT | DB_GRANT_INSERT, "PARTS", "mary, sue");
797 \end{verbatim}
798
799
800 \membersection{wxDb::IsOpen}\label{wxdbisopen}
801
802 \func{bool}{IsOpen}{\void}
803
804 Indicates whether the database connection to the datasource is currently opened.
805
806
807 \membersection{wxDb::Open}\label{wxdbopen}
808
809 \func{bool}{Open}{\param{char *}{Dsn}, \param{char *}{Uid}, \param{char *}{AuthStr}}
810
811 \wxheading{Parameters}
812
813 \docparam{Dsn}{Data source name. The name of the ODBC data source as
814 assigned when the data source is initially set up through the ODBC data
815 source manager.}
816 \docparam{Uid}{User ID. The name (ID) of the user you wish to connect as
817 to the data source. The user name (ID) determines what objects you
818 have access to in the datasource and what datasource privileges you have.
819 Privileges include being able to create new objects, update objects, delete
820 objects and so on. Users and privileges are normally administered by the
821 database administrator.}
822 \docparam{AuthStr}{The password associated witht the Uid.}
823
824 \wxheading{Remarks}
825
826 After a wxDb instance is created, it must then be opened. When opening a data source, there must be hree pieces of information passed. The data source name, user name (ID) and the password for the user. No database activity on the data source can be performed until it is opened. This would normally be done at program startup and the data source would remain open for the duration of the program run. Note: It is possible to have multiple data sources open at the same time to support distributed database connections.
827
828 \wxheading{Example}
829 \begin{verbatim}
830 wxDb sampleDB(Db.Henv);
831 if (!sampleDB.Open("Oracle 7.1 HP/UX", "gtasker", "myPassword"))
832 {
833 // Error opening data source
834 }
835 \end{verbatim}
836
837
838 \membersection{wxDb::RollbackTrans}\label{wxdbrollbacktrans}
839
840 \func{bool}{RollbackTrans}{\void}
841
842 Function to "rollback" changes made to the database. After an insert/update/delete, the operation may be "undone" by issuing this command any time before a \helpref{wxDb::CommitTrans}{wxdbcommittrans} is called on the database connection.
843
844 \wxheading{Remarks}
845
846 Transactions begin implicitly as soon as you make a change to the database. At any time thereafter, you can save your work to the database (using \helpref{wxDb::CommitTrans}{wxdbcommittrans}) or undo all of your changes using this function.
847
848 \normalbox{Calling this member function rolls back ALL open (uncommitted) transactions on this ODBC connection.}
849
850 \wxheading{See also}
851
852 \helpref{wxDb::CommitTrans}{wxdbcommittrans} for a special note on cursors
853
854
855 \membersection{wxDb::SetSqlLogging}\label{wxdbsetsqllogging}
856
857 \func{bool}{SetSqlLogging}{\param{wxDbSqlLogState}{ state}, \param{const wxChar *}{filename = SQL_LOG_FILENAME}, \param{bool}{ append = FALSE}}
858
859 \wxheading{Parameters}
860
861 \docparam{state}{Either sqlLogOFF or sqlLogON (see \helpref{enum wxDbSqlLogState}{wxdbenumsqllogstate}). Turns logging of SQL commands sent to the data
862 source OFF or ON.}
863 \docparam{filename}{{\it OPTIONAL}. Name of the file to which the log text is to be written.}
864 \docparam{append}{{\it OPTIONAL}. Whether the file is appended to or overwritten.}
865
866 \wxheading{Remarks}
867
868 When called with {\it sqlLogON}, all commands sent to the data source engine are logged to the file specified by {\it filename}. Logging is done by embedded WriteSqlLog() calls in the database member functions, or may be manually logged by adding calls to WriteSqlLog() in your own source code.
869
870 When called with {\it sqlLogOFF}, the logging file is closed, and any calls to WriteSqlLog() are ignored.
871
872
873 \membersection{wxDb::TableExists}\label{wxdbtablexists}
874
875 \func{bool}{TableExists}{\param{const char *}{tableName}, \param{const char *}{userID=NULL}, \param{const char *}{path=NULL}}
876
877 Checks the ODBC data source for the existence of a table. If a {\it userID} is specified, then the table must be accessible by that user (user must have at least minimal privileges to the table).
878
879 \wxheading{Parameters}
880
881 \docparam{tableName}{Name of the table to check for the existence of}
882 \docparam{userID}{Owner of the table. Specify a userID when the datasource you are connected
883 to allows multiple unique tables with the same name to be owned by different users. {\it userID}
884 is evaluated as follows:}
885
886 \begin{verbatim}
887 userID == NULL ... UserID is ignored (DEFAULT)
888 userID == "" ... UserID set equal to 'this->uid'
889 userID != "" ... UserID set equal to 'userID'
890 \end{verbatim}
891
892 \wxheading{Remarks}
893
894 {\it tableName} may refer to a table, view, alias or synonym.
895
896 This function does not indicate whether or not the user has privleges to query or perform other functions on the table.
897
898
899 \membersection{wxDb::TranslateSqlState}\label{wxdbtranslatesqlstate}
900
901 \func{int}{TranslateSqlState}{\param{const wxChar *}{SQLState}}
902
903 \wxheading{Parameters}
904
905 \docparam{SQLState}{Converts an ODBC sqlstate to an internal error code.}
906
907 \wxheading{Return value}
908
909 Returns the internal class DB_ERR code. See \helpref{wxDb::DB_STATUS}{wxdbdbstatus} definition.
910
911
912 \membersection{wxDb::WriteSqlLog}\label{wxdbwritesqllog}
913
914 \func{bool}{WriteSqlLog}{\param{const wxChar *}{logMsg}}
915
916 \wxheading{Parameters}
917
918 \docparam{logMsg}{Free form string to be written to the log file.}
919
920 \wxheading{Remarks}
921
922 Very useful debugging tool that may be turned on/off during run time. The
923 passed in string {\it logMsg} will be written to a log file if SQL logging
924 is turned on (see \helpref{wxDb::SetSqlLogging}{wxdbsetsqllogging} for details on turning logging on/off).
925
926 \wxheading{Return value}
927
928 If SQL logging is off when a call to WriteSqlLog() is made, or there is a
929 failure to write the log message to the log file, the function returns
930 FALSE without performing the requested log, otherwise TRUE is returned.
931
932 \wxheading{See also}
933
934 \helpref{wxDb::SetSqlLogging}{wxdbsetsqllogging}
935
936 ==============
937 \membersection{wxDb::IsFwdOnlyCursors}\label{wxdbisfwdonlycursors}
938
939 \func{bool}{IsFwdOnlyCursors}{\void}
940
941 \wxheading{Remarks}
942
943 This setting indicates whether this database connection was created
944 as being capable of using only forward scrolling cursors. This function
945 does NOT indicate if the ODBC driver or datasource supports backward
946 scrolling cursors. There is no standard way of detecting if the driver
947 or datasource can support backward scrolling cursors.
948
949 If a wxDb instance was created as being forward only cursors, then even if
950 the datasource and ODBC driver support backward scrolling cursors, then
951 tables using this database connection can only use forward scrolling
952 cursors.
953
954 The default setting of whether a wxDb connection to a database allows
955 forward-only or also backward scrolling cursors is defined in setup.h by
956 the wxODBC_FWD_ONLY_CURSORS value. This default setting can be overridden
957 when the wxDb connection is initially created (see \helpref{wxDb constructor}{wxdbconstr}).
958
959 \wxheading{Return value}
960
961 Returns TRUE if this datasource connection is defined as using only forward
962 scrolling cursors, or FALSE if the connection is defined as being capable
963 of supporting backward scrolling cursors (see note above).
964
965 \wxheading{See also}
966
967 \helpref{wxDb constructor}{wxdbconstr}
968
969 =======
970 \membersection{wxDb::Dbms}\label{wxdbdbms}
971
972 \func{wxDBMS }{Dbms}{\void}
973
974 \wxheading{Remarks}
975
976 The return value will be of the enumerated type wxDBMS. This enumerated
977 type contains a list of all the currently tested and supported databases.
978
979 Additional databases may be work with these classes, but these databases
980 returned by this function have been tested and confirmed to work with
981 these ODBC classes.
982
983 enum wxDBMS includes:
984 \begin{verbatim}
985 dbmsUNIDENTIFIED
986 dbmsORACLE
987 dbmsSYBASE_ASA
988 dbmsSYBASE_ASE
989 dbmsMY_SQL_SERVER
990 dbmsMY_SQL
991 dbmsPOSTGRES
992 dbmsACCESS
993 dbmsDBASE
994 dbmsINFORMIX
995 \end{verbatim}
996
997 There are known issues with conformance to the ODBC standards with several
998 datasources listed above. Please see the overview for specific details on
999 on which datasource have which issues.
1000
1001 \wxheading{Return value}
1002
1003 The return value will indicate which of the supported datasources is
1004 currently connected to by this connection. In the event that the
1005 datasource is not recognized, a value of 'dbmsUNIDENTIFIED' is returned.
1006
1007 ==========
1008 \membersection{wxDb::SetDebugErrorMessages}\label{wxdbsetdebugerrormessages}
1009
1010 \func{void}{SetDebugErrorMessages}{\param{bool}{state}}
1011
1012 \docparam{state}{Either TRUE (debug messages are displayed) or FALSE (debug
1013 messages are not displayed.}
1014
1015 \wxheading{Remarks}
1016
1017 Turns on/off debug error messages from the ODBC class library. When
1018 this function is passed TRUE, errors are reported to the user automatically
1019 in a text or pop-up dialog when an ODBC error occurs. When passed FALSE,
1020 errors are silently handled.
1021
1022 When compiled in release mode (FINAL=1), this setting has no affect.
1023
1024 \wxheading{See also}
1025
1026 \helpref{wxDb constructor}{wxdbconstr}
1027
1028
1029
1030 ==========
1031 \membersection{wxDb::LogError}\label{wxdblogerror}
1032
1033 \func{void}{LogError}{\param{const char *}{errMsg} \param{const char *}{SQLState=0}}
1034
1035 \docparam{errMsg}{Free-form text to display describing the error to be logged.}
1036 \docparam{SQLState}{Native SQL state error}
1037
1038 \wxheading{Remarks}
1039 Calling this function will enter a log message in the error list maintained
1040 for the database connection. This log message is free form and can be
1041 anything the programmer wants to enter in the error list.
1042
1043 If SQL logging is turned on, the call to this function will also log the
1044 text into the SQL log file.
1045
1046 \wxheading{See also}
1047
1048 \helpref{wxDb::WriteSqlLog}{wxdbwritesqllog}
1049
1050
1051
1052 ==========
1053 \membersection{wxDb::GetTypeInfXxxxx}\label{wxdbgettypeinf}
1054
1055 \func{wxDbSqlTypeInfo }{GetTypeInfDate}{\void}
1056 \func{wxDbSqlTypeInfo }{GetTypeInfFloat}{\void}
1057 \func{wxDbSqlTypeInfo }{GetTypeInfInteger}{\void}
1058 \func{wxDbSqlTypeInfo }{GetTypeInfVarchar}{\void}
1059
1060
1061 \wxheading{Remarks}
1062
1063
1064 \wxheading{Return value}
1065