2000-08-08 06:11:51 +00:00
\section { \class { wxDb} } \label { wxdb}
2000-07-15 19:51:35 +00:00
2000-08-08 06:11:51 +00:00
A wxDb instance is a connection to an ODBC data source which may
2000-07-15 19:51:35 +00:00
be opened, closed, and re-opened an unlimited number of times. A
database connection allows function to be performed directly on the
data source, as well as allowing access to any tables/views defined in
the data source to which the user has sufficient privileges.
\wxheading { Include files}
<wx/db.h>
2000-08-14 11:44:26 +00:00
\wxheading { Helper classes and data structures}
The following classes and structs are defined in db.cpp/.h for use with the wxDb class.
\begin { itemize} \itemsep =0pt
\item \helpref { wxDbColFor} { wxdbcolfor}
\item \helpref { wxDbColInf} { wxdbcolinf}
\item \helpref { wxDbTableInf} { wxdbtableinf}
\item \helpref { wxDbInf} { wxdbinf}
\end { itemize}
\wxheading { Constants}
NOTE: In a future release, all ODBC class constants will be prefaced with 'wx'
\begin { verbatim}
wxDB_ PATH_ MAX Maximum path length allowed to be passed to the ODBC
driver to indicate where the data file is located.
DB_ MAX_ COLUMN_ NAME_ LEN Maximum supported length for the name of a column
DB_ MAX_ ERROR_ HISTORY Maximum number of error messages retained in the
queue before being overwritten by new errors.
DB_ MAX_ ERROR_ MSG_ LEN Maximum supported length of an error message returned
by the ODBC classes
DB_ MAX_ STATEMENT_ LEN Maximum supported length for a complete SQL statement
to be passed to the ODBC driver
DB_ MAX_ TABLE_ NAME_ LEN Maximum supported length for the name of a table
DB_ MAX_ WHERE_ CLAUSE_ LEN Maximum supported WHERE clause length that can be
passed to the ODBC driver
DB_ TYPE_ NAME_ LEN Maximum length of the name of a column's data type
\end { verbatim}
2000-08-08 06:11:51 +00:00
\wxheading { Enumerated types}
2000-08-14 11:44:26 +00:00
\docparam { enum { \bf wxDbSqlLogState} } { sqlLogOFF, sqlLogON}
2000-08-08 06:11:51 +00:00
{ \it enum { \bf wxDBMS} }
2000-08-14 11:44:26 +00:00
These are the databases currently tested and working with the ODBC classes. A call to \helpref { wxDb::Dbms} { wxdbdbms} will return one of these enumerated values listed below.
2000-08-08 06:11:51 +00:00
\begin { verbatim}
dbmsUNIDENTIFIED,
dbmsORACLE,
dbmsSYBASE_ ASA, // Adaptive Server Anywhere
dbmsSYBASE_ ASE, // Adaptive Server Enterprise
dbmsMS_ SQL_ SERVER,
dbmsMY_ SQL,
dbmsPOSTGRES,
dbmsACCESS,
dbmsDBASE,
dbmsINFORMIX
\end { verbatim}
2000-08-14 11:44:26 +00:00
See the remarks in \helpref { wxDb::Dbms} { wxdbdbms} for exceptions/issues with each of these database engines.
2000-08-08 06:11:51 +00:00
\wxheading { Public member variables}
2000-08-14 11:44:26 +00:00
\docparam { SWORD { \bf wxDb::cbErrorMsg} } { This member variable is populated as a result of calling \helpref { wxDb::GetNextError} { wxdbgetnexterror} . Contains the count of bytes in the wxDb::errorMsg string.}
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
\docparam { int { \bf wxDb::DB\_ STATUS} } { The last ODBC error that occurred on this data connection. Possible codes are:}
2000-08-08 06:11:51 +00:00
\begin { verbatim}
DB_ ERR_ GENERAL_ WARNING // SqlState = '01000'
DB_ ERR_ DISCONNECT_ ERROR // SqlState = '01002'
DB_ ERR_ DATA_ TRUNCATED // SqlState = '01004'
DB_ ERR_ PRIV_ NOT_ REVOKED // SqlState = '01006'
DB_ ERR_ INVALID_ CONN_ STR_ ATTR // SqlState = '01S00'
DB_ ERR_ ERROR_ IN_ ROW // SqlState = '01S01'
DB_ ERR_ OPTION_ VALUE_ CHANGED // SqlState = '01S02'
DB_ ERR_ NO_ ROWS_ UPD_ OR_ DEL // SqlState = '01S03'
DB_ ERR_ MULTI_ ROWS_ UPD_ OR_ DEL // SqlState = '01S04'
DB_ ERR_ WRONG_ NO_ OF_ PARAMS // SqlState = '07001'
DB_ ERR_ DATA_ TYPE_ ATTR_ VIOL // SqlState = '07006'
DB_ ERR_ UNABLE_ TO_ CONNECT // SqlState = '08001'
DB_ ERR_ CONNECTION_ IN_ USE // SqlState = '08002'
DB_ ERR_ CONNECTION_ NOT_ OPEN // SqlState = '08003'
DB_ ERR_ REJECTED_ CONNECTION // SqlState = '08004'
DB_ ERR_ CONN_ FAIL_ IN_ TRANS // SqlState = '08007'
DB_ ERR_ COMM_ LINK_ FAILURE // SqlState = '08S01'
DB_ ERR_ INSERT_ VALUE_ LIST_ MISMATCH // SqlState = '21S01'
DB_ ERR_ DERIVED_ TABLE_ MISMATCH // SqlState = '21S02'
DB_ ERR_ STRING_ RIGHT_ TRUNC // SqlState = '22001'
DB_ ERR_ NUMERIC_ VALUE_ OUT_ OF_ RNG // SqlState = '22003'
DB_ ERR_ ERROR_ IN_ ASSIGNMENT // SqlState = '22005'
DB_ ERR_ DATETIME_ FLD_ OVERFLOW // SqlState = '22008'
DB_ ERR_ DIVIDE_ BY_ ZERO // SqlState = '22012'
DB_ ERR_ STR_ DATA_ LENGTH_ MISMATCH // SqlState = '22026'
DB_ ERR_ INTEGRITY_ CONSTRAINT_ VIOL // SqlState = '23000'
DB_ ERR_ INVALID_ CURSOR_ STATE // SqlState = '24000'
DB_ ERR_ INVALID_ TRANS_ STATE // SqlState = '25000'
DB_ ERR_ INVALID_ AUTH_ SPEC // SqlState = '28000'
DB_ ERR_ INVALID_ CURSOR_ NAME // SqlState = '34000'
DB_ ERR_ SYNTAX_ ERROR_ OR_ ACCESS_ VIOL // SqlState = '37000'
DB_ ERR_ DUPLICATE_ CURSOR_ NAME // SqlState = '3C000'
DB_ ERR_ SERIALIZATION_ FAILURE // SqlState = '40001'
DB_ ERR_ SYNTAX_ ERROR_ OR_ ACCESS_ VIOL2 // SqlState = '42000'
DB_ ERR_ OPERATION_ ABORTED // SqlState = '70100'
DB_ ERR_ UNSUPPORTED_ FUNCTION // SqlState = 'IM001'
DB_ ERR_ NO_ DATA_ SOURCE // SqlState = 'IM002'
DB_ ERR_ DRIVER_ LOAD_ ERROR // SqlState = 'IM003'
DB_ ERR_ SQLALLOCENV_ FAILED // SqlState = 'IM004'
DB_ ERR_ SQLALLOCCONNECT_ FAILED // SqlState = 'IM005'
DB_ ERR_ SQLSETCONNECTOPTION_ FAILED // SqlState = 'IM006'
DB_ ERR_ NO_ DATA_ SOURCE_ DLG_ PROHIB // SqlState = 'IM007'
DB_ ERR_ DIALOG_ FAILED // SqlState = 'IM008'
DB_ ERR_ UNABLE_ TO_ LOAD_ TRANSLATION_ DLL // SqlState = 'IM009'
DB_ ERR_ DATA_ SOURCE_ NAME_ TOO_ LONG // SqlState = 'IM010'
DB_ ERR_ DRIVER_ NAME_ TOO_ LONG // SqlState = 'IM011'
DB_ ERR_ DRIVER_ KEYWORD_ SYNTAX_ ERROR // SqlState = 'IM012'
DB_ ERR_ TRACE_ FILE_ ERROR // SqlState = 'IM013'
DB_ ERR_ TABLE_ OR_ VIEW_ ALREADY_ EXISTS // SqlState = 'S0001'
DB_ ERR_ TABLE_ NOT_ FOUND // SqlState = 'S0002'
DB_ ERR_ INDEX_ ALREADY_ EXISTS // SqlState = 'S0011'
DB_ ERR_ INDEX_ NOT_ FOUND // SqlState = 'S0012'
DB_ ERR_ COLUMN_ ALREADY_ EXISTS // SqlState = 'S0021'
DB_ ERR_ COLUMN_ NOT_ FOUND // SqlState = 'S0022'
DB_ ERR_ NO_ DEFAULT_ FOR_ COLUMN // SqlState = 'S0023'
DB_ ERR_ GENERAL_ ERROR // SqlState = 'S1000'
DB_ ERR_ MEMORY_ ALLOCATION_ FAILURE // SqlState = 'S1001'
DB_ ERR_ INVALID_ COLUMN_ NUMBER // SqlState = 'S1002'
DB_ ERR_ PROGRAM_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1003'
DB_ ERR_ SQL_ DATA_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1004'
DB_ ERR_ OPERATION_ CANCELLED // SqlState = 'S1008'
DB_ ERR_ INVALID_ ARGUMENT_ VALUE // SqlState = 'S1009'
DB_ ERR_ FUNCTION_ SEQUENCE_ ERROR // SqlState = 'S1010'
DB_ ERR_ OPERATION_ INVALID_ AT_ THIS_ TIME // SqlState = 'S1011'
DB_ ERR_ INVALID_ TRANS_ OPERATION_ CODE // SqlState = 'S1012'
DB_ ERR_ NO_ CURSOR_ NAME_ AVAIL // SqlState = 'S1015'
DB_ ERR_ INVALID_ STR_ OR_ BUF_ LEN // SqlState = 'S1090'
DB_ ERR_ DESCRIPTOR_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1091'
DB_ ERR_ OPTION_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1092'
DB_ ERR_ INVALID_ PARAM_ NO // SqlState = 'S1093'
DB_ ERR_ INVALID_ SCALE_ VALUE // SqlState = 'S1094'
DB_ ERR_ FUNCTION_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1095'
DB_ ERR_ INF_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1096'
DB_ ERR_ COLUMN_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1097'
DB_ ERR_ SCOPE_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1098'
DB_ ERR_ NULLABLE_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1099'
DB_ ERR_ UNIQUENESS_ OPTION_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1100'
DB_ ERR_ ACCURACY_ OPTION_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1101'
DB_ ERR_ DIRECTION_ OPTION_ OUT_ OF_ RANGE // SqlState = 'S1103'
DB_ ERR_ INVALID_ PRECISION_ VALUE // SqlState = 'S1104'
DB_ ERR_ INVALID_ PARAM_ TYPE // SqlState = 'S1105'
DB_ ERR_ FETCH_ TYPE_ OUT_ OF_ RANGE // SqlState = 'S1106'
DB_ ERR_ ROW_ VALUE_ OUT_ OF_ RANGE // SqlState = 'S1107'
DB_ ERR_ CONCURRENCY_ OPTION_ OUT_ OF_ RANGE // SqlState = 'S1108'
DB_ ERR_ INVALID_ CURSOR_ POSITION // SqlState = 'S1109'
DB_ ERR_ INVALID_ DRIVER_ COMPLETION // SqlState = 'S1110'
DB_ ERR_ INVALID_ BOOKMARK_ VALUE // SqlState = 'S1111'
DB_ ERR_ DRIVER_ NOT_ CAPABLE // SqlState = 'S1C00'
DB_ ERR_ TIMEOUT_ EXPIRED // SqlState = 'S1T00'
\end { verbatim}
2000-08-14 11:44:26 +00:00
\docparam { struct { \bf wxDb::dbInf} } { This structure is internal to the wxDb class and contains details of the ODBC datasource that the current instance of the wxDb is connected to in its members. When the data source is opened, all of the information contained in the dbInf structure is queried from the data source. This information is used almost exclusively within the ODBC class library. Where there is a need for this information outside of the class library a member function such as wxDbTable::IsCursorClosedOnCommit() has been added for ease of use.}
2000-08-08 06:11:51 +00:00
\begin { verbatim}
char dbmsName[40] - Name of the dbms product
char dbmsVer[64] - Version # of the dbms product
char driverName[40] - Driver name
char odbcVer[60] - ODBC version of the driver
char drvMgrOdbcVer[60] - ODBC version of the driver manager
char driverVer[60] - Driver version
char serverName[80] - Server Name, typically a connect string
char databaseName[128] - Database filename
char outerJoins[2] - Does datasource support outer joins
char procedureSupport[2] - Does datasource support stored procedures
UWORD maxConnections - Maximum # of connections datasource supports
UWORD maxStmts - Maximum # of HSTMTs per HDBC
UWORD apiConfLvl - ODBC API conformance level
UWORD cliConfLvl - Is datasource SAG compliant
UWORD sqlConfLvl - SQL conformance level
UWORD cursorCommitBehavior - How cursors are affected on db commit
UWORD cursorRollbackBehavior - How cursors are affected on db rollback
UWORD supportNotNullClause - Does datasource support NOT NULL clause
char supportIEF[2] - Integrity Enhancement Facility (Ref. Integrity)
UDWORD txnIsolation - Transaction isolation level supported by driver
UDWORD txnIsolationOptions - Transaction isolation level options available
UDWORD fetchDirections - Fetch directions supported
UDWORD lockTypes - Lock types supported in SQLSetPos
UDWORD posOperations - Position operations supported in SQLSetPos
UDWORD posStmts - Position statements supported
UDWORD scrollConcurrency - Scrollable cursor concurrency options supported
UDWORD scrollOptions - Scrollable cursor options supported
UDWORD staticSensitivity - Can additions/deletions/updates be detected
UWORD txnCapable - Indicates if datasource supports transactions
UDWORD loginTimeout - Number seconds to wait for a login request
\end { verbatim}
2000-08-14 11:44:26 +00:00
\docparam { char { \bf wxDb::errorList} [DB_ MAX_ ERROR_ HISTORY][DB_ MAX_ ERROR_ MSG_ LEN]} { The last n ODBC errors that have occurred on this database connection.}
2000-08-08 06:11:51 +00:00
\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.}
\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.}
\docparam { wxChar { \bf wxDb::sqlState} [20]} { Set by wxDb::TranslateSqlState(). Indicates the error state after a failed ODBC operation. Used for reporting ODBC errors.}
2000-08-14 11:44:26 +00:00
\wxheading { Remarks}
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
Default cursor scrolling is defined by wxODBC_ FWD_ ONLY_ CURSORS in setup.h
when the wxWindows library is built. This behavior can be overridden when
an instance of a wxDb is created (see \helpref { wxDb constructor} { wxdbconstr} ).
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
\wxheading { See also}
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
\helpref { wxDbColFor} { wxdbcolfor} , \helpref { wxDbColInf} { wxdbcolinf} , \helpref { wxDbTable} { wxdbtable} , \helpref { wxDbTableInf} { wxdbtableinf} , \helpref { wxDbInf} { wxdbinf}
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
\subsection { Associated non-class functions} \label { wxdbfunctions}
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
The following functions are used in conjunction with the wxDb class.
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
\func { wxDb *} { wxDbGetConnection} { \param { wxDbConnectInf *} { pDbConfig} , \param { bool } { FwdOnlyCursors=(bool)wxODBC_ FWD_ ONLY_ CURSORS} }
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
\func { bool} { wxDbFreeConnection} { \param { wxDb *} { pDb} }
2000-07-15 19:51:35 +00:00
2000-08-14 11:44:26 +00:00
\func { void} { wxDbCloseConnections} { \void }
2000-07-15 19:51:35 +00:00
2000-08-14 11:44:26 +00:00
\func { int} { wxDbConnectionsInUse} { \void }
2000-07-15 19:51:35 +00:00
2000-08-14 11:44:26 +00:00
\func { bool} { wxDbSqlLog} { \param { wxDbSqlLogState } { state} , \param { const wxChar *} { filename = SQL_ LOG_ FILENAME} }
2000-07-15 19:51:35 +00:00
2000-08-14 11:44:26 +00:00
\func { bool} { wxDbGetDataSource} { \param { HENV } { henv} , \param { char *} { Dsn} , \param { SWORD } { DsnMax} , \param { char *} { DsDesc} , \param { SWORD } { DsDescMax} , \param { UWORD } { direction = SQL_ FETCH_ NEXT} }
2000-07-15 19:51:35 +00:00
2000-08-14 11:44:26 +00:00
\latexignore { \rtfignore { \wxheading { Members} } }
2000-07-15 19:51:35 +00:00
2000-08-08 06:11:51 +00:00
\membersection { wxDb::wxDb} \label { wxdbconstr}
\func { } { wxDb} { \void }
2000-07-15 19:51:35 +00:00
Default constructor.
2000-08-14 11:44:26 +00:00
\func { } { wxDb} { \param { HENV\& } { aHenv} , \param { bool } { FwdOnlyCursors=(bool)wxODBC_ FWD_ ONLY_ CURSORS} }
2000-07-15 19:51:35 +00:00
Constructor, used to create an ODBC connection to a data source.
\wxheading { Parameters}
2000-08-14 11:44:26 +00:00
\docparam { aHenv} { Environment handle used for this connection.}
\docparam { FwdOnlyCursors} { Will cursors created for use with this datasource connection only allow forward scrolling cursors.}
2000-07-15 19:51:35 +00:00
\wxheading { Remarks}
2000-08-08 06:11:51 +00:00
This is the constructor for the wxDb class. The wxDb object must
2000-07-15 19:51:35 +00:00
be created and opened before any database activity can occur.
\wxheading { Example}
2000-08-14 11:44:26 +00:00
2000-07-15 19:51:35 +00:00
\begin { verbatim}
2000-08-08 06:11:51 +00:00
wxDbConnectInf ConnectInf;
....Set values for member variables of ConnectInf here
2000-07-15 19:51:35 +00:00
2000-08-08 06:11:51 +00:00
wxDb sampleDB(ConnectInf.Henv);
if (!sampleDB.Open(ConnectInf.Dsn, ConnectInf.Uid, ConnectInf.AuthStr))
2000-07-15 19:51:35 +00:00
{
// Error opening data source
}
\end { verbatim}
2000-08-08 06:11:51 +00:00
\membersection { wxDb::Catalog} \label { wxdbcatalog}
2000-07-15 19:51:35 +00:00
\func { bool} { Catalog} { \param { char *} { userID} , \param { char *} { fileName = SQL_ CATALOG_ FILENAME} }
2000-08-08 06:11:51 +00:00
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.
2000-07-15 19:51:35 +00:00
\wxheading { Parameters}
\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.}
\docparam { fileName} { OPTIONAL argument. Name of the text file to create and write the DB catalog to.}
2000-08-08 06:11:51 +00:00
\wxheading { Return value}
2000-07-15 19:51:35 +00:00
2000-08-08 06:11:51 +00:00
Returns TRUE if the catalog request was successful, of FALSE if there was some reason the catalog could not be generated
2000-07-15 19:51:35 +00:00
\wxheading { Example}
2000-08-14 11:44:26 +00:00
2000-07-15 19:51:35 +00:00
\begin { verbatim}
============== ============== ================ ========= =======
TABLE NAME COLUMN NAME DATA TYPE PRECISION LENGTH
============== ============== ================ ========= =======
EMPLOYEE RECID (0008)NUMBER 15 8
EMPLOYEE USER_ ID (0012)VARCHAR2 13 13
EMPLOYEE FULL_ NAME (0012)VARCHAR2 26 26
EMPLOYEE PASSWORD (0012)VARCHAR2 26 26
EMPLOYEE START_ DATE (0011)DATE 19 16
\end { verbatim}
2000-08-08 06:11:51 +00:00
\membersection { wxDb::Close} \label { wxdbclose}
2000-07-15 19:51:35 +00:00
\func { void} { Close} { \void }
2000-08-08 06:11:51 +00:00
Closes the database connection.
2000-07-15 19:51:35 +00:00
\wxheading { Remarks}
2000-08-08 06:11:51 +00:00
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.
2000-08-14 11:44:26 +00:00
Any wxDbTable instances which use this connection must be deleted before closing the database connection.
2000-07-15 19:51:35 +00:00
\wxheading { Example}
2000-08-14 11:44:26 +00:00
2000-07-15 19:51:35 +00:00
\begin { verbatim}
// Commit any open transactions on the data source
sampleDB.CommitTrans();
2000-08-14 11:44:26 +00:00
// Delete any remaining wxDbTable objects allocated with new
2000-07-15 19:51:35 +00:00
delete parts;
2000-08-08 06:11:51 +00:00
// Close the wxDb connection when finished with it
2000-07-15 19:51:35 +00:00
sampleDB.Close();
// Free Environment Handle that ODBC uses
if (SQLFreeEnv(Db.Henv) != SQL_ SUCCESS)
{
// Error freeing environment handle
}
\end { verbatim}
2000-08-08 06:11:51 +00:00
\membersection { wxDb::CommitTrans} \label { wxdbcommittrans}
\func { bool} { CommitTrans} { \void }
Permanently "commits" changes (insertions/deletions/updates) to the database.
\wxheading { Return value}
Returns TRUE if the commit was successful, or FALSE if the commit failed.
\wxheading { Remarks}
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.
\wxheading { Special Note : { \it Cursors} }
\normalbox { It is important to understand that different database/ODBC driver combinations handle
transactions differently. One thing in particular that you must pay attention to is
cursors, in regard to transactions. Cursors are what allow you to scroll through
records forward and backward and to manipulate records as you scroll through them.
When you issue a query, a cursor is created behind the scenes. The cursor keeps track
of the query and keeps track of the current record pointer. After you commit or
rollback a transaction, the cursor may be closed automatically. This means you must
2000-08-14 11:44:26 +00:00
requery the data source before you can perform any additional work against the wxDbTable
2000-08-08 06:11:51 +00:00
object. This is only necessary however if the data source closes the cursor after a
2000-08-14 11:44:26 +00:00
commit or rollback. Use the wxDbTable::IsCursorClosedOnCommit() member function to
2000-08-08 06:11:51 +00:00
determine the data source's transaction behavior. Note, it would be very inefficient
to just assume the data source closes the cursor and always requery. This could put
a significant, unnecessary load on data sources that leave the cursors open after a
transaction.}
\membersection { wxDb::CreateView} \label { wxdbcreateviews}
\func { bool} { CreateView} { \param { char *} { viewName} , \param { char *} { colList} , \param { char *} { pSqlStmt} }
Creates a SQL VIEW.
\wxheading { Parameters}
\docparam { viewName} { The name of the view. e.g. PARTS_ V}
2000-08-14 11:44:26 +00:00
\docparam { colList} { { \it OPTIONAL} Pass in a comma delimited list of column names if you wish to explicitly name each column in the result set. If not desired, pass in an empty string.}
\docparam { pSqlStmt} { Pointer to the select statement portion of the CREATE VIEW statement. Must be a complete, valid SQL SELECT statement.}
2000-08-08 06:11:51 +00:00
\wxheading { Remarks}
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.
NOTE: Views are not available with all datasources. Oracle is one example of a datasouce which does support views.
\wxheading { Example}
2000-08-14 11:44:26 +00:00
2000-08-08 06:11:51 +00:00
\begin { verbatim}
// Incomplete code sample
db.CreateView("PARTS_ SD1", "PN, PD, QTY",
2000-08-14 11:44:26 +00:00
"SELECT PART_ NO, PART_ DESC, QTY_ ON_ HAND * 1.1 FROM PARTS \
WHERE STORAGE_ DEVICE = 1");
2000-08-08 06:11:51 +00:00
// PARTS_ SD1 can now be queried just as if it were a data table.
// e.g. SELECT PN, PD, QTY FROM PARTS_ SD1
\end { verbatim}
\membersection { wxDb::DispAllErrors} \label { wxdbdispallerrors}
\func { bool} { DispAllErrors} { \param { HENV} { aHenv} , { \param } { HDBC} { aHdbc = SQL_ NULL_ HDBC} , { \param } { HSTMT} { aHstmt = SQL_ NULL_ HSTMT} }
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.
\wxheading { Parameters}
\docparam { aHenv} { A handle to the ODBC environment.}
2000-08-14 11:44:26 +00:00
\docparam { aHdbc} { A handle to the ODBC connection. Pass this in if the ODBC function call that erred out required a hdbc or hstmt argument.}
\docparam { AHstmt} { A handle to the ODBC statement being executed against. Pass this in if the ODBC function call that erred out required a hstmt argument.}
2000-08-08 06:11:51 +00:00
\wxheading { Remarks}
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()).
\wxheading { See also}
2000-08-14 11:44:26 +00:00
\helpref { wxDb::SetSqlLogging} { wxdbsetsqllogging} , wxDbSqlLog
2000-08-08 06:11:51 +00:00
\wxheading { Example}
2000-08-14 11:44:26 +00:00
2000-08-08 06:11:51 +00:00
\begin { verbatim}
if (SQLExecDirect(hstmt, (UCHAR FAR *) pSqlStmt, SQL_ NTS) != SQL_ SUCCESS)
// Display all ODBC errors for this stmt
return(db.DispAllErrors(db.henv, db.hdbc, hstmt));
\end { verbatim}
\membersection { wxDb::DispNextError} \label { wxdbdispnexterror}
\func { void} { DispNextError} { \void }
\wxheading { Remarks}
This function is normally used internally within the ODBC class library.
It could be used externally if calling ODBC functions directly. This
function works in conjunction with \helpref { wxDb::GetNextError} { wxdbgetnexterror} when errors (or
sometimes informational messages) returned from ODBC need to be analyzed
rather than simply displaying them as an error. GetNextError() retrieves
the next ODBC error from the ODBC error queue. The wxDb member variables
"sqlState", "nativeError" and "errorMsg" could then be evaluated. To
display the error retrieved, DispNextError() could then be called.
The combination of GetNextError() and DispNextError() can be used to
iteratively step through the errors returned from ODBC evaluating each
one in context and displaying the ones you choose.
\wxheading { Example}
2000-08-14 11:44:26 +00:00
2000-08-08 06:11:51 +00:00
\begin { verbatim}
// Drop the table before attempting to create it
sprintf(sqlStmt, "DROP TABLE %s", tableName);
// Execute the drop table statement
if (SQLExecDirect(hstmt,(UCHAR FAR *)sqlStmt,SQL_ NTS) != SQL_ SUCCESS)
{
// Check for sqlState = S0002, "Table or view not found".
// Ignore this error, bomb out on any other error.
pDb->GetNextError(henv, hdbc, hstmt);
if (strcmp(pDb->sqlState, "S0002"))
{
pDb->DispNextError(); // Displayed error retrieved
pDb->DispAllErrors(henv, hdbc, hstmt); // Display all other errors, if any
pDb->RollbackTrans(); // Rollback the transaction
CloseCursor(); // Close the cursor
return(FALSE); // Return Failure
}
}
\end { verbatim}
\membersection { wxDb::DropView} \label { wxdbdropview}
\func { bool} { DropView} { \param { const char *} { viewName} }
Drops the data table view named in 'viewName'.
\wxheading { Parameters}
\docparam { viewName} { Name of the view to be dropped.}
\wxheading { Remarks}
2000-08-14 11:44:26 +00:00
If the view does not exist, this function will return TRUE. Note that views are not supported with all data sources.
2000-08-08 06:11:51 +00:00
\membersection { wxDb::ExecSql} \label { wxdbexecsql}
\func { bool} { ExecSql} { \param { char *} { pSqlStmt} }
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.
\wxheading { Parameters}
\docparam { pSqlStmt} { Pointer to the SQL statement to be executed.}
\wxheading { Remarks}
This member extends the wxDb class and allows you to build and execute ANY VALID
SQL statement against the data source. This allows you to extend the class
library by being able to issue any SQL statement that the data source is capable
of processing.
\wxheading { See also}
\helpref { wxDb::GetData} { wxdbgetdata} , \helpref { wxDb::GetNext} { wxdbgetnext}
\membersection { wxDb::FwdOnlyCursors} \label { wxdbfwdonlycursors}
\func { bool} { FwdOnlyCursors} { \void }
Indicates whether this connection to the datasource only allows forward scrolling cursors or not. This state is set at connection creation time.
2000-08-14 11:44:26 +00:00
\wxheading { Remarks}
In wxWindows v2.4 release, this function will be deprecated to use a renamed version of the function called wxDb::IsFwdOnlyCursors() to match the normal wxWindows naming conventions for class member functions.
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
\wxheading { See also}
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
\helpref { wxDb::IsFwdOnlyCursors} { wxdbisfwdonlycursors} , \helpref { wxDb::wxDb} { wxdbconstr} , \helpref { wxDbGetConnection} { wxdbfunctions}
2000-08-08 06:11:51 +00:00
\membersection { wxDb::GetCatalog} \label { wxdbgetcatalog}
\func { wxDbInf *} { GetCatalog} { \param { char *} { userID} }
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.
\wxheading { Parameters}
2000-08-14 11:44:26 +00:00
\docparam { userID} { Owner of the table. Specify a userID when the datasource you are connected to allows multiple unique tables with the same name to be owned by different users. { \it userID} is evaluated as follows:}
2000-08-08 06:11:51 +00:00
\begin { verbatim}
userID == NULL ... UserID is ignored (DEFAULT)
userID == "" ... UserID set equal to 'this->uid'
userID != "" ... UserID set equal to 'userID'
\end { verbatim}
\wxheading { Remarks}
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.
\membersection { wxDb::GetColumnCount} \label { wxdbgetcolumncount}
\func { int} { GetColumnCount} { \param { char *} { tableName} , \param { const char *} { userID} }
\wxheading { Parameters}
\docparam { tableName} { A table name you wish to obtain column information about.}
2000-08-14 11:44:26 +00:00
\docparam { userID} { Name of the user that owns the table(s). Required for some datasources for situations where there may be multiple tables with the same name in the datasource, but owned by different users. { \it userID} is evaluated in the following manner:}
2000-08-08 06:11:51 +00:00
\begin { verbatim}
userID == NULL ... UserID is ignored (DEFAULT)
userID == "" ... UserID set equal to 'this->uid'
userID != "" ... UserID set equal to 'userID'
\end { verbatim}
\wxheading { Return value}
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.
\membersection { wxDb::GetColumns} \label { wxdbgetcolumns}
\func { wxDbColInf *} { GetColumns} { \param { char *} { tableName} , \param { int *} { numCols} , \param { const char *} { userID=NULL} }
\func { wxDbColInf *} { GetColumns} { \param { char *} { tableName[]} , \param { const char *} { userID} }
\wxheading { Parameters}
\docparam { tableName} { A table name you wish to obtain column information about.}
2000-08-14 11:44:26 +00:00
\docparam { numCols} { A pointer to a integer which will hold a count of the number of columns returned by this function}
\docparam { tableName[]} { An array of pointers to table names you wish to obtain column information about. The last element of this array must be a NULL string.}
\docparam { userID} { Name of the user that owns the table(s). Required for some datasources for situations where there may be multiple tables with the same name in the datasource, but owned by different users. { \it userID} is evaluated in the following manner:}
2000-08-08 06:11:51 +00:00
\begin { verbatim}
userID == NULL ... UserID is ignored (DEFAULT)
userID == "" ... UserID set equal to 'this->uid'
userID != "" ... UserID set equal to 'userID'
\end { verbatim}
\wxheading { Return value}
This function returns an array of wxDbColInf structures. This allows you to obtain
information regarding the columns of your table(s). If no columns were found, or
2000-08-14 11:44:26 +00:00
an error occurred, this pointer will be zero (null).
2000-08-08 06:11:51 +00:00
THE CALLING FUNCTION IS RESPONSIBLE FOR DELETING THE { \it wxDbColInf} MEMORY WHEN IT IS
FINISHED WITH IT.
\normalbox { ALL column bindings associated with this wxDb instance are unbound
by this function. This function should use its own wxDb instance
to avoid undesired unbinding of columns.}
\wxheading { See also}
\helpref { wxDbColInf} { wxdbcolinf}
\wxheading { Example}
2000-08-14 11:44:26 +00:00
2000-08-08 06:11:51 +00:00
\begin { verbatim}
char *tableList[] = { "PARTS", 0} ;
wxDbColInf *colInf = pDb->GetColumns(tableList);
if (colInf)
{
// Use the column inf
.......
// Destroy the memory
delete [] colInf;
}
\end { verbatim}
\membersection { wxDb::GetData} \label { wxdbgetdata}
\func { bool} { GetData} { \param { UWORD} { colNo} , \param { SWORD} { cType} , \param { PTR} { pData} , \param { SDWORD} { maxLen} , \param { SDWORD FAR *} { cbReturned} }
Used to retrieve result set data without binding column values to memory variables (i.e. not using a wxDbTable instance to access table data).
\wxheading { Parameters}
\docparam { colNo} { Ordinal number of column in the result set to be returned.}
\docparam { cType} { The C data type that is to be returned.}
\docparam { pData} { Memory buffer which will hold the data returned by the call to this function.}
\docparam { maxLen} { Maximum size of the buffer that will hold the returned value.}
\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.}
\wxheading { See also}
\helpref { wxDb::GetNext} { wxdbgetnext} , \helpref { wxDb::ExecSql} { wxdbexecsql}
\wxheading { Example}
2000-08-14 11:44:26 +00:00
2000-08-08 06:11:51 +00:00
\begin { verbatim}
SDWORD cb;
ULONG reqQty;
wxString sqlStmt;
2000-08-14 11:44:26 +00:00
sqlStmt = "SELECT SUM(REQUIRED_ QTY - PICKED_ QTY) FROM ORDER_ TABLE WHERE \
PART_ RECID = 1450 AND REQUIRED_ QTY > PICKED_ QTY";
2000-08-08 06:11:51 +00:00
// Perform the query
if (!pDb->ExecSql(sqlStmt.c_ str()))
{
// ERROR
return(0);
}
// Request the first row of the result set
if (!pDb->GetNext())
{
// ERROR
return(0);
}
Read column #1 of this row of the result set and store the value in 'reqQty'
if (!pDb->GetData(1, SQL_ C_ ULONG, & reqQty, 0, & cb))
{
// ERROR
return(0);
}
// Check for a NULL result
if (cb == SQL_ NULL_ DATA)
return(0);
\end { verbatim}
\wxheading { Remarks}
When requesting multiple columns to be returned from the result set (for example, the SQL query
requested 3 columns be returned), the calls to GetData must request the columns in ordinal
sequence (1,2,3 or 1,3 or 2,3).
\membersection { wxDb::GetDatabaseName} \label { wxdbgetdatabasename}
\func { char *} { GetDatabaseName} { \void }
Returns the name of the database engine.
\membersection { wxDb::GetDataSource} \label { wxdbgetdatasource}
\func { char *} { GetDataSource} { \void }
Returns the ODBC datasource name.
\membersection { wxDb::GetHDBC} \label { wxdbgethdbc}
\func { HDBC} { GetHDBC} { \void }
Returns the ODBC handle to the database connection.
\membersection { wxDb::GetHENV} \label { wxdbgethenv}
\func { HENV} { GetHENV} { \void }
Returns the ODBC environment handle.
\membersection { wxDb::GetHSTMT} \label { wxdbgethstmt}
\func { HSTMT} { GetHSTMT} { \void }
Returns the ODBC statement handle associated with this database connection.
\membersection { wxDb::GetKeyFields} \label { wxdbgetkeyfields}
\func { int} { GetKeyFields} { \param { char *} { tableName} , \param { wxDbColInf *} { colInf} , \param { int} { nocols} }
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.
2000-08-14 11:44:26 +00:00
This function is primarily for use by the \helpref { wxDb::GetColumns} { wxdbgetcolumns} function, but may be called if desired from the client application.
2000-08-08 06:11:51 +00:00
\wxheading { Parameters}
\docparam { tableName} { Name of the table for which the columns will be evaluated as to their inclusion in any indexes.}
2000-08-14 11:44:26 +00:00
\docparam { colInf} { Data structure containing the column definitions (obtained with \helpref { wxDb::GetColumns} { wxdbgetcolumns} ). This function populates the PkCol, PkTableName, and FkTableName members of the colInf structure.}
2000-08-08 06:11:51 +00:00
\docparam { nocols} { Number of columns defined in the instance of colInf.}
\wxheading { Return value}
Currently always returns TRUE.
\wxheading { See also}
\helpref { wxDbColInf} { wxdbcolinf} , \helpref { wxDb::GetColumns} { wxdbgetcolumns}
\membersection { wxDb::GetNext} \label { wxdbgetnext}
2000-08-14 11:44:26 +00:00
\func { bool} { GetNext} { \void }
2000-08-08 06:11:51 +00:00
Requests the next row in the result set obtained by issueing a query through a direct request using wxDb::ExecSql().
\wxheading { See also}
\helpref { wxDb::ExecSql} { wxdbexecsql} , \helpref { wxDb::GetData} { wxdbgetdata}
\membersection { wxDb::GetNextError} \label { wxdbgetnexterror}
\func { bool} { GetNextError} { \param { HENV} { aHenv} , \param { HDBC} { aHdbc = SQL_ NULL_ HDBC} , \param { HSTMT} { aHstmt = SQL_ NULL_ HSTMT} }
\wxheading { Parameters}
\docparam { aHenv} { A handle to the ODBC environment.}
\docparam { aHdbc} { A handle to the ODBC connection. Pass this in if the ODBC function call that
erred out required a hdbc or hstmt argument.}
\docparam { AHstmt} { A handle to the ODBC statement being executed against. Pass this in if the
ODBC function call that erred out requires a hstmt argument.}
\wxheading { See also}
\helpref { wxDb::DispNextError} { wxdbdispnexterror} , \helpref { wxDb::DispAllErrors} { wxdbdispallerrors}
\wxheading { Example}
2000-08-14 11:44:26 +00:00
2000-08-08 06:11:51 +00:00
\begin { verbatim}
if (SQLExecDirect(hstmt, (UCHAR FAR *) pSqlStmt, SQL_ NTS) != SQL_ SUCCESS)
{
// Display all ODBC errors for this stmt
return(db.DispAllErrors(db.henv, db.hdbc, hstmt));
}
\end { verbatim}
\membersection { wxDb::GetPassword} \label { wxdbgetpassword}
\func { char *} { GetPassword} { \void }
Returns the password used to connect to the datasource.
\membersection { wxDb::GetTableCount} \label { wxdbgettablecount}
\func { int} { GetTableCount} { \void }
Returns the number of wxDbTable() instances currently using this data source connection.
\membersection { wxDb::GetUsername} \label { wxdbgetusername}
\func { char *} { GetUsername} { \void }
Returns the user name used to access the datasource.
\membersection { wxDb::Grant} \label { wxdbgrant}
\func { bool} { Grant} { \param { int} { privileges} , \param { char *} { tableName} , \param { char *} { userList = "PUBLIC"} }
Use this member function to GRANT privileges to users for accessing tables in the datasource.
\wxheading { Parameters}
2000-08-14 11:44:26 +00:00
\docparam { privileges} { Use this argument to select which privileges you want to grant. Pass DB_ GRANT_ ALL to grant all privileges. To grant individual privileges pass one or more of the following OR'd together:}
2000-08-08 06:11:51 +00:00
\begin { verbatim}
DB_ GRANT_ SELECT = 1
DB_ GRANT_ INSERT = 2
DB_ GRANT_ UPDATE = 4
DB_ GRANT_ DELETE = 8
DB_ GRANT_ ALL = DB_ GRANT_ SELECT | DB_ GRANT_ INSERT |
DB_ GRANT_ UPDATE | DB_ GRANT_ DELETE
\end { verbatim}
\docparam { tableName} { The name of the table you wish to grant privileges on.}
2000-08-14 11:44:26 +00:00
\docparam { userList} { A comma delimited list of users to grant the privileges to. If this argument is not passed in, the privileges will be given to the general PUBLIC.}
2000-08-08 06:11:51 +00:00
\wxheading { Remarks}
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.
\wxheading { Example}
2000-08-14 11:44:26 +00:00
2000-08-08 06:11:51 +00:00
\begin { verbatim}
db.Grant(DB_ GRANT_ SELECT | DB_ GRANT_ INSERT, "PARTS", "mary, sue");
\end { verbatim}
2000-08-14 11:44:26 +00:00
\membersection { wxDb::IsFwdOnlyCursors} \label { wxdbisfwdonlycursors}
\func { bool} { IsFwdOnlyCursors} { \void }
Indicates whether this connection to the datasource only allows forward scrolling cursors or not. This state is set at connection creation time.
\wxheading { Remarks}
Added as of wxWindows v2.4 release, this function is a renamed version of wxDb::FwdOnlyCursors() to match the normal wxWindows naming conventions for class member functions.
This function is not available in versions prior to v2.4. You should use \helpref { wxDb::FwdOnlyCursors} { wxdbfwdonlycursors} for wxWindows versions priori to 2.4.
\wxheading { See also}
\helpref { wxDb::wxDb} { wxdbconstr} , \helpref { wxDbGetConnection} { wxdbfunctions}
2000-08-08 06:11:51 +00:00
\membersection { wxDb::IsOpen} \label { wxdbisopen}
\func { bool} { IsOpen} { \void }
Indicates whether the database connection to the datasource is currently opened.
\membersection { wxDb::Open} \label { wxdbopen}
\func { bool} { Open} { \param { char *} { Dsn} , \param { char *} { Uid} , \param { char *} { AuthStr} }
\wxheading { Parameters}
\docparam { Dsn} { Data source name. The name of the ODBC data source as
assigned when the data source is initially set up through the ODBC data
source manager.}
\docparam { Uid} { User ID. The name (ID) of the user you wish to connect as
to the data source. The user name (ID) determines what objects you
have access to in the datasource and what datasource privileges you have.
Privileges include being able to create new objects, update objects, delete
objects and so on. Users and privileges are normally administered by the
database administrator.}
\docparam { AuthStr} { The password associated witht the Uid.}
\wxheading { Remarks}
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.
\wxheading { Example}
2000-08-14 11:44:26 +00:00
2000-08-08 06:11:51 +00:00
\begin { verbatim}
wxDb sampleDB(Db.Henv);
if (!sampleDB.Open("Oracle 7.1 HP/UX", "gtasker", "myPassword"))
{
// Error opening data source
}
\end { verbatim}
\membersection { wxDb::RollbackTrans} \label { wxdbrollbacktrans}
\func { bool} { RollbackTrans} { \void }
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.
\wxheading { Remarks}
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.
\normalbox { Calling this member function rolls back ALL open (uncommitted) transactions on this ODBC connection.}
\wxheading { See also}
\helpref { wxDb::CommitTrans} { wxdbcommittrans} for a special note on cursors
\membersection { wxDb::SetSqlLogging} \label { wxdbsetsqllogging}
\func { bool} { SetSqlLogging} { \param { wxDbSqlLogState} { state} , \param { const wxChar *} { filename = SQL_ LOG_ FILENAME} , \param { bool} { append = FALSE} }
\wxheading { Parameters}
2000-08-14 11:44:26 +00:00
\docparam { state} { Either sqlLogOFF or sqlLogON (see \helpref { enum wxDbSqlLogState} { wxdbcolfor} ). Turns logging of SQL commands sent to the data source OFF or ON.}
2000-08-08 06:11:51 +00:00
\docparam { filename} { { \it OPTIONAL} . Name of the file to which the log text is to be written.}
\docparam { append} { { \it OPTIONAL} . Whether the file is appended to or overwritten.}
\wxheading { Remarks}
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.
When called with { \it sqlLogOFF} , the logging file is closed, and any calls to WriteSqlLog() are ignored.
\membersection { wxDb::TableExists} \label { wxdbtablexists}
\func { bool} { TableExists} { \param { const char *} { tableName} , \param { const char *} { userID=NULL} , \param { const char *} { path=NULL} }
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).
\wxheading { Parameters}
\docparam { tableName} { Name of the table to check for the existence of}
\docparam { userID} { Owner of the table. Specify a userID when the datasource you are connected
to allows multiple unique tables with the same name to be owned by different users. { \it userID}
is evaluated as follows:}
\begin { verbatim}
userID == NULL ... UserID is ignored (DEFAULT)
userID == "" ... UserID set equal to 'this->uid'
userID != "" ... UserID set equal to 'userID'
\end { verbatim}
\wxheading { Remarks}
{ \it tableName} may refer to a table, view, alias or synonym.
2000-08-14 11:44:26 +00:00
This function does not indicate whether or not the user has privileges to query or perform other functions on the table.
2000-08-08 06:11:51 +00:00
\membersection { wxDb::TranslateSqlState} \label { wxdbtranslatesqlstate}
\func { int} { TranslateSqlState} { \param { const wxChar *} { SQLState} }
\wxheading { Parameters}
\docparam { SQLState} { Converts an ODBC sqlstate to an internal error code.}
\wxheading { Return value}
2000-08-14 11:44:26 +00:00
Returns the internal class DB_ ERR code. See \helpref { wxDb::DB_ STATUS} { wxdb} definition.
2000-08-08 06:11:51 +00:00
\membersection { wxDb::WriteSqlLog} \label { wxdbwritesqllog}
\func { bool} { WriteSqlLog} { \param { const wxChar *} { logMsg} }
\wxheading { Parameters}
\docparam { logMsg} { Free form string to be written to the log file.}
\wxheading { Remarks}
Very useful debugging tool that may be turned on/off during run time. The
passed in string { \it logMsg} will be written to a log file if SQL logging
is turned on (see \helpref { wxDb::SetSqlLogging} { wxdbsetsqllogging} for details on turning logging on/off).
\wxheading { Return value}
If SQL logging is off when a call to WriteSqlLog() is made, or there is a
failure to write the log message to the log file, the function returns
FALSE without performing the requested log, otherwise TRUE is returned.
\wxheading { See also}
\helpref { wxDb::SetSqlLogging} { wxdbsetsqllogging}
2000-08-14 11:44:26 +00:00
\begin { comment} % George: this is a duplicate of one above (only with more text)
2000-08-08 06:11:51 +00:00
\membersection { wxDb::IsFwdOnlyCursors} \label { wxdbisfwdonlycursors}
\func { bool} { IsFwdOnlyCursors} { \void }
\wxheading { Remarks}
This setting indicates whether this database connection was created
as being capable of using only forward scrolling cursors. This function
does NOT indicate if the ODBC driver or datasource supports backward
scrolling cursors. There is no standard way of detecting if the driver
or datasource can support backward scrolling cursors.
If a wxDb instance was created as being forward only cursors, then even if
the datasource and ODBC driver support backward scrolling cursors, then
tables using this database connection can only use forward scrolling
cursors.
The default setting of whether a wxDb connection to a database allows
forward-only or also backward scrolling cursors is defined in setup.h by
the wxODBC_ FWD_ ONLY_ CURSORS value. This default setting can be overridden
when the wxDb connection is initially created (see \helpref { wxDb constructor} { wxdbconstr} ).
\wxheading { Return value}
Returns TRUE if this datasource connection is defined as using only forward
scrolling cursors, or FALSE if the connection is defined as being capable
of supporting backward scrolling cursors (see note above).
\wxheading { See also}
\helpref { wxDb constructor} { wxdbconstr}
2000-08-14 11:44:26 +00:00
\end { comment}
2000-08-08 06:11:51 +00:00
\membersection { wxDb::Dbms} \label { wxdbdbms}
\func { wxDBMS } { Dbms} { \void }
\wxheading { Remarks}
The return value will be of the enumerated type wxDBMS. This enumerated
type contains a list of all the currently tested and supported databases.
Additional databases may be work with these classes, but these databases
returned by this function have been tested and confirmed to work with
these ODBC classes.
enum wxDBMS includes:
\begin { verbatim}
dbmsUNIDENTIFIED
dbmsORACLE
dbmsSYBASE_ ASA
dbmsSYBASE_ ASE
dbmsMY_ SQL_ SERVER
dbmsMY_ SQL
dbmsPOSTGRES
dbmsACCESS
dbmsDBASE
dbmsINFORMIX
\end { verbatim}
There are known issues with conformance to the ODBC standards with several
datasources listed above. Please see the overview for specific details on
2000-08-14 11:44:26 +00:00
which datasource have which issues.
2000-08-08 06:11:51 +00:00
\wxheading { Return value}
The return value will indicate which of the supported datasources is
currently connected to by this connection. In the event that the
datasource is not recognized, a value of 'dbmsUNIDENTIFIED' is returned.
\membersection { wxDb::SetDebugErrorMessages} \label { wxdbsetdebugerrormessages}
2000-08-14 11:44:26 +00:00
\func { void} { SetDebugErrorMessages} { \param { bool } { state} }
2000-08-08 06:11:51 +00:00
\docparam { state} { Either TRUE (debug messages are displayed) or FALSE (debug
messages are not displayed.}
\wxheading { Remarks}
Turns on/off debug error messages from the ODBC class library. When
this function is passed TRUE, errors are reported to the user automatically
in a text or pop-up dialog when an ODBC error occurs. When passed FALSE,
errors are silently handled.
When compiled in release mode (FINAL=1), this setting has no affect.
\wxheading { See also}
\helpref { wxDb constructor} { wxdbconstr}
\membersection { wxDb::LogError} \label { wxdblogerror}
\func { void} { LogError} { \param { const char *} { errMsg} \param { const char *} { SQLState=0} }
\docparam { errMsg} { Free-form text to display describing the error to be logged.}
\docparam { SQLState} { Native SQL state error}
\wxheading { Remarks}
2000-08-14 11:44:26 +00:00
2000-08-08 06:11:51 +00:00
Calling this function will enter a log message in the error list maintained
for the database connection. This log message is free form and can be
anything the programmer wants to enter in the error list.
If SQL logging is turned on, the call to this function will also log the
text into the SQL log file.
\wxheading { See also}
\helpref { wxDb::WriteSqlLog} { wxdbwritesqllog}
2000-08-14 11:44:26 +00:00
\section { \class { wxDbColInf} } \label { wxdbcolinf}
Used with the \helpref { wxDb::GetColumns} { wxdbgetcolumns} functions for obtaining all retrievable information about a columns definition.
\section { \class { wxDbColFor} } \label { wxdbcolfor}
Beginning support for handling international formatting specifically on dates and floats.
Only one function is provided with this class currently:
\membersection { wxDbColFor::Format} \label { wxdbcolforformat}
\func { int} { Format} { \param { int } { Nation} , \param { int } { dbDataType} , \param { SWORD } { sqlDataType} , \param { short } { columnSize} , \param { short } { decimalDigits} } \label { wxdbcolforformat}
Work in progress, and should be inter-related with wxLocale
\section { \class { wxDbInf} } \label { wxdbinf}
Contains information regarding the database connection (data source name,
number of tables, etc). A pointer to a wxDbTableInf is included in this
class so a program can create a wxDbTableInf array instance to maintain all
information about all tables in the datasource to have all the datasource's
information in one memory structure.
\section { \class { wxDbTable} } \label { wxdbtable}
A wxDbTable instance provides re-usable access to rows of data in
a table contained within the associated ODBC data source
\wxheading { Include files}
<wx/dbtable.h>\\
<wx/db.h>
\latexignore { \rtfignore { \wxheading { Members} } }
\wxheading { Helper classes and data structures}
The following classes and structs are defined in dbtable.cpp/.h for use with the wxDbTable class.
\begin { verbatim}
class wxDbColDef : Bound column definitions for use by a wxDbTable
instance
class wxDbColDataPtr : Pointer to dynamic column definitions for use with
a wxDbTable instance
class wxDbIdxDef : Used in creation of non-primary indexes
\end { verbatim}
\wxheading { Constants}
\begin { verbatim}
wxDB_ DEFAULT_ CURSOR Index number of the cursor that each table will use
by default.
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
wxDB_ QUERY_ ONLY Used to indicate whether a table that is opened is
for query only, or if insert/update/deletes will
be performed on the table. Less overhead (cursors
and memory) are allocated for query only tables, plus
read access times are faster with some datasources.
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
wxDB_ ROWID_ LEN [Oracle specific] - Used when CanUpdateByRowID() is
true. Optimizes updates so they are faster by
updating on the Oracle-specific ROWID column rather
than some other index.
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
wxDB_ DISABLE_ VIEW Use to indicate when a database view should not be
if a table is normally set up to use a view.
[Currently unsupported.]
\end { verbatim}
2000-08-08 06:11:51 +00:00
\wxheading { Remarks}
2000-08-14 11:44:26 +00:00
\wxheading { See also}
2000-08-08 06:11:51 +00:00
2000-08-14 11:44:26 +00:00
\helpref { wxDbTable} { wxdbtable}
\latexignore { \rtfignore { \wxheading { Members} } }
\membersection { wxDbTable::wxDbTable} \label { wxdbtableconstr}
\func { } { wxDbTable} { \param { wxDb *} { pwxDb} , \param { const char *} { tblName} , \param { const int } { nCols} ,\param { const char *} { qryTblName = 0} , \param { bool} { qryOnly = !wxDB_ QUERY_ ONLY} ,\param { const char *} { tblPath=NULL} }
Default constructor.
\wxheading { Parameters}
\docparam { pSqlStmt} { }
\docparam { typeOfDel} { }
\docparam { pWhereClause} { Default is 0.}
\membersection { wxDbTable::wxDbTable} \label { wxdbtabledestr}
\func { virtual} { \destruct { wxDbTable} } { }
Virtual default destructor.
\membersection { wxDbTable::BuildDeleteStmt} \label { wxdbtablebuilddeletestmt}
\func { void} { BuildSelectStmt} { \param { char *} { pSqlStmt} , \param { int } { typeOfDel} , \param { const char *} { pWhereClause=0} }
\wxheading { Parameters}
\docparam { pSqlStmt} { }
\docparam { typeOfDel} { }
\docparam { pWhereClause} { Default is 0.}
\membersection { wxDbTable::BuildSelectStmt} \label { wxdbtablebuildselectstmt}
\func { void} { BuildSelectStmt} { \param { char *} { pSqlStmt} , \param { int } { typeOfSelect} , \param { bool } { distinct} }
\wxheading { Parameters}
\docparam { pSqlStmt} { }
\docparam { typeOfSelect} { }
\docparam { distinct} { }
\membersection { wxDbTable::BuildUpdateStmt} \label { wxdbtablebuildupdatestmt}
\func { void} { BuildSelectStmt} { \param { char *} { pSqlStmt} , \param { int } { typeOfUpd} , \param { const char *} { pWhereClause=0} }
\wxheading { Parameters}
\docparam { pSqlStmt} { }
\docparam { typeOfUpd} { }
\docparam { pWhereClause} { Default is 0.}
\membersection { wxDbTable::BuildWhereStmt} \label { wxdbtablebuildwherestmt}
\func { void} { BuildSelectStmt} { \param { char *} { pWhereClause} , \param { int } { typeOfWhere} , \param { const char *} { qualTableName=0} , \param { const char *} { useLikeComparison=FALSE} }
\wxheading { Parameters}
\docparam { pWhereClause} { }
\docparam { typeOfWhere} { }
\docparam { qualTableName} { Default is 0.}
\docparam { useLikeComparison} { Default is FALSE.}
\membersection { wxDbTable::CanSelectForUpdate} \label { wxdbtablecanselectforupdate}
\func { bool} { CanSelectForUpdate} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::CanUpdateByROWID} \label { wxdbtablecanupdatebyrowid}
\func { bool} { CanUpdateByROWID} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::ClearMemberVars} \label { wxdbtableclearmembervars}
\func { void} { ClearMemberVars} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::CloseCursor} \label { wxdbtableclosecursor}
\func { bool} { CloseCursor} { \param { HSTMT} { cursor} }
\wxheading { Parameters}
\docparam { cursor} { }
\wxheading { Remarks}
\membersection { wxDbTable::Count} \label { wxdbtablecount}
\func { ULONG} { Count} { \param { const char *} { args="*"} }
\wxheading { Parameters}
\docparam { args} { Default is "*".}
\wxheading { Remarks}
\membersection { wxDbTable::CreateIndex} \label { wxdbtablecreateindex}
\func { bool} { CreateIndex} { \param { const char *} { idxName} , \param { bool} { unique} , \param { int } { noIdxCols} , \param { wxDbIdxDef *} { pIdxDefs} , \param { bool } { attemptDrop=TRUE} }
\wxheading { Parameters}
\docparam { idxName} { }
\docparam { unique} { }
\docparam { noIdxCols} { }
\docparam { pIdxDefs} { }
\docparam { attemptDrop} { Default is TRUE.}
\wxheading { Remarks}
\membersection { wxDbTable::CreateTable} \label { wxdbtablecreatetable}
\func { bool} { CreateTable} { \param { bool } { attemptDrop=TRUE} }
\wxheading { Parameters}
\docparam { attemptDrop} { Default is TRUE.}
\wxheading { Remarks}
\membersection { wxDbTable::DB_ STATUS} \label { wxdbtabledbstatus}
\func { bool} { DB_ STATUS} { \void }
Accessor function for the private member variable DB_ STATUS.
\membersection { wxDbTable::IsColNull} \label { wxdbtableiscolnull}
\func { bool} { IsColNull} { \param { int } { colNo} }
\wxheading { Parameters}
\docparam { colNo} { }
\wxheading { Remarks}
\membersection { wxDbTable::Delete} \label { wxdbtabledelete}
\func { bool} { Delete} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::DeleteCursor} \label { wxdbtabledeletecursor}
\func { bool} { DeleteCursor} { \param { HSTMT } { hstmtDel} }
\wxheading { Parameters}
\docparam { hstmtDel} { }
\wxheading { Remarks}
\membersection { wxDbTable::DeleteWhere} \label { wxdbtabledeletewhere}
\func { bool} { DeleteWhere} { \param { const char *} { pWhereClause} }
\wxheading { Parameters}
\docparam { pWhereClause} { }
\wxheading { Remarks}
\membersection { wxDbTable::DeleteMatching} \label { wxdbtabledeletematching}
\func { bool} { DeleteMatching} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::DropIndex} \label { wxdbtabledropindex}
\func { bool} { DropIndex} { \param { const char *} { idxName} }
\wxheading { Parameters}
\docparam { idxName} { }
\wxheading { Remarks}
\membersection { wxDbTable::DropTable} \label { wxdbtabledroptable}
\func { bool} { DropTable} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::GetColDefs} \label { wxdbtablegetcoldefs}
\func { wxDbColDef *} { GetColDefs} { }
\wxheading { Remarks}
\membersection { wxDbTable::GetCursor} \label { wxdbtablegetcursor}
\func { HSTMT} { GetCursor} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::GetDb} \label { wxdbtablegetdb}
\func { wxDb *} { GetDb} { }
Accessor function for the private member variable pDb which is a pointer to the datasource connection that this wxDbTable instance uses.
\wxheading { Remarks}
\membersection { wxDbTable::GetFirst} \label { wxdbtablegetfirst}
\func { bool} { GetFirst} { \void }
\wxheading { Remarks}
This function can only be used if the datasource connection used by the wxDbTable instance was created with FwdOnlyCursors set to FALSE. If the connection does not allow backward scrolling cursors, this function will return FALSE, and the data contained in the bound columns will be undefined.
\wxheading { See also}
\helpref { wxDb::FwdOnlyCursors} { wxdbfwdonlycursors}
\membersection { wxDbTable::GetFromClause} \label { wxdbtablegetfromclause}
\func { const char *} { GetFromClause} { }
Accessor function that returns the current FROM setting assigned with the \helpref { wxDbTable::SetFromClause} { wxdbtablesetfromclause} .
\membersection { wxDbTable::GetLast} \label { wxdbtablegetlast}
\func { bool} { GetLast} { \void }
\wxheading { Remarks}
This function can only be used if the datasource connection used by the wxDbTable instance was created with FwdOnlyCursors set to FALSE. If the connection does not allow backward scrolling cursors, this function will return FALSE, and the data contained in the bound columns will be undefined.
\wxheading { See also}
\helpref { wxDb::FwdOnlyCursors} { wxdbfwdonlycursors}
\membersection { wxDbTable::GetNewCursor} \label { wxdbtablegetnewcursor}
\func { HSTMT *} { GetNewCursor} { \param { bool } { setCursor=FALSE} , \param { bool } { bindColumns=TRUE} }
\wxheading { Parameters}
\docparam { setCursor} { Default is FALSE.}
\docparam { bindColumns} { Default is TRUE.}
\wxheading { Remarks}
\membersection { wxDbTable::GetNext} \label { wxdbtablegetnext}
\func { bool} { GetNext} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::GetNumberOfColumns} \label { wxdbtablegetnumberofcolumns}
\func { bool} { GetNumberOfColumns} { }
Accessor function that returns the number of columns that are statically bound for access by the wxDbTable instance.
\membersection { wxDbTable::GetOrderByClause} \label { wxdbtablegetorderbyclause}
\func { const char *} { GetOrderByClause} { }
Accessor function that returns the current ORDER BY setting assigned with the \helpref { wxDbTable::SetOrderByClause} { wxdbtablesetorderbyclause} .
\membersection { wxDbTable::GetPrev} \label { wxdbtablegetprev}
\func { bool} { GetPrev} { \void }
\wxheading { Remarks}
This function can only be used if the datasource connection used by the wxDbTable instance was created with FwdOnlyCursors set to FALSE. If the connection does not allow backward scrolling cursors, this function will return FALSE, and the data contained in the bound columns will be undefined.
\wxheading { See also}
\helpref { wxDb::FwdOnlyCursors} { wxdbfwdonlycursors}
\membersection { wxDbTable::GetQueryTableName} \label { wxdbtablegetquerytablename}
\func { const char *} { GetQueryTableName} { }
\wxheading { Remarks}
\membersection { wxDbTable::GetRowNum} \label { wxdbtablegetrownum}
\func { UWORD} { GetRowNum} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::GetTableName} \label { wxdbtablegettablename}
\func { const char *} { GetTableName} { }
\wxheading { Remarks}
\membersection { wxDbTable::GetTablePath} \label { wxdbtablegettablepath}
\func { const char *} { GetTablePath} { }
\wxheading { Remarks}
\membersection { wxDbTable::GetWhereClause} \label { wxdbtablegetwhereclause}
\func { const char *} { GetWhereClause} { }
Accessor function that returns the current WHERE setting assigned with the \helpref { wxDbTable::SetWhereClause} { wxdbtablesetwhereclause}
\membersection { wxDbTable::Insert} \label { wxdbtableinsert}
\func { int} { Insert} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::IsCursorClosedOnCommit} \label { wxdbtableiscursorclosedoncommit}
\func { bool} { IsCursorClosedOnCommit} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::IsQueryOnly} \label { wxdbtableisqueryonly}
\func { bool} { IsQueryOnly} { }
Accessor function that returns a value indicating if this wxDbTable instance was created to allow only queries to be performed on the bound columns. If this function returns TRUE, then no actions may be performed using this wxDbTable instance that would modify (insert/delete/update) the table's data.
\membersection { wxDbTable::Open} \label { wxdbtableopen}
\func { bool} { Open} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::Query} \label { wxdbtablequery}
\func { virtual bool} { Query} { \param { bool} { forUpdate=FALSE} , \param { bool} { distinct=FALSE} }
\wxheading { Parameters}
\docparam { forUpdate} { Default is FALSE.}
\docparam { distinct} { Default is FALSE.}
\wxheading { Remarks}
\membersection { wxDbTable::QueryBySqlStmt} \label { wxdbtablequerybysqlstmt}
\func { bool} { QueryBySqlStmt} { \param { const char *} { pSqlStmt} }
\wxheading { Parameters}
\docparam { pSqlStmt} { }
\wxheading { Remarks}
\membersection { wxDbTable::QueryMatching} \label { wxdbtablequerymatching}
\func { virtual bool} { QueryMatching} { \param { bool} { forUpdate=FALSE} , \param { bool} { distinct=FALSE} }
\wxheading { Parameters}
\docparam { forUpdate} { Default is FALSE.}
\docparam { distinct} { Default is FALSE.}
\wxheading { Remarks}
\membersection { wxDbTable::QueryOnKeyFields} \label { wxdbtablequeryonkeyfields}
\func { bool} { QueryOnKeyFields} { \param { bool} { forUpdate=FALSE} , \param { bool} { distinct=FALSE} }
\wxheading { Parameters}
\docparam { forUpdate} { Default is FALSE.}
\docparam { distinct} { Default is FALSE.}
\wxheading { Remarks}
\membersection { wxDbTable::Refresh} \label { wxdbtablerefresh}
\func { bool} { Refresh} { \void }
\wxheading { Remarks}
\membersection { wxDbTable::SetColDefs} \label { wxdbtablesetcoldefs}
\func { void} { SetColDefs} { \param { int } { index} , \param { const char *} { fieldName} , \param { int } { dataType} , \param { void *} { pData} , \param { int } { cType} , \param { int } { size} , \param { bool } { keyField = FALSE} , \param { bool } { upd = TRUE} , \param { bool } { insAllow = TRUE} , \param { bool } { derivedCol = FALSE} }
\func { wxDbColDataPtr *} { SetColDefs} { \param { wxDbColInf *} { colInfs} , \param { ULONG } { numCols} }
\wxheading { Parameters}
\docparam { index} { }
\docparam { fieldName} { }
\docparam { dataType} { }
\docparam { pData} { }
\docparam { cType} { }
\docparam { size} { }
\docparam { keyField} { Default is FALSE.}
\docparam { upd} { Default is TRUE.}
\docparam { insAllow} { Default is TRUE.}
\docparam { derivedCol} { Default is FALSE.}
\docparam { colInfs} { }
\docparam { numCols} { }
\wxheading { Remarks}
\membersection { wxDbTable::SetCursor} \label { wxdbtablesetcursor}
\func { bool} { Open} { \param { HSTMT *} { hstmtActivate = (void **) wxDB_ DEFAULT_ CURSOR} }
\wxheading { Parameters}
\docparam { hstmtActivate} { Default is wxDB_ DEFAULT_ CURSOR.}
\wxheading { Remarks}
\membersection { wxDbTable::SetFromClause} \label { wxdbtablesetfromclause}
\func { void} { SetFromClause} { \param { const wxString& } { From} }
\wxheading { Parameters}
\docparam { From} { }
\membersection { wxDbTable::SetNull} \label { wxdbtablesetnull}
\func { bool} { SetNull} { \param { int } { colNo} }
\func { bool} { SetNull} { \param { const char *} { colName} }
\wxheading { Parameters}
\docparam { colNo} { }
\docparam { colName} { }
\wxheading { Remarks}
\membersection { wxDbTable::SetOrderByClause} \label { wxdbtablesetorderbyclause}
\func { void} { SetOrderByClause} { \param { const wxString& } { OrderBy} }
\wxheading { Parameters}
\docparam { OrderBy} { }
\membersection { wxDbTable::SetQueryTimeout} \label { wxdbtablesetquerytimeout}
\func { bool} { SetQueryTimeout} { \param { UDWORD } { nSeconds} }
\wxheading { Parameters}
\docparam { nSeconds} { }
\wxheading { Remarks}
\membersection { wxDbTable::SetWhereClause} \label { wxdbtablesetwhereclause}
\func { void} { SetWhereClause} { \param { const wxString& } { Where} }
\wxheading { Parameters}
\docparam { Where} { }
\membersection { wxDbTable::Update} \label { wxdbtableupdate}
\func { bool} { Update} { \void }
\func { bool} { Update} { \param { const char *} { pSqlStmt} }
\wxheading { Parameters}
\docparam { pSqlStmt} { }
\wxheading { Remarks}
\membersection { wxDbTable::UpdateWhere} \label { wxdbtableupdatewhere}
\func { bool} { UpdateWhere} { \param { const char *} { pWhereClause} }
\wxheading { Parameters}
\docparam { pWhereClause} { }
\wxheading { Remarks}
\membersection { wxDbTable::operator $ + + $ } \label { wxdbtableplusplus}
\func { bool} { operator $ + + $ } { \void }
Same as \helpref { wxDbTable::GetNext} { wxdbtablegetnext}
\wxheading { See also}
\helpref { wxDbTable::GetNext} { wxdbtablegetnext}
\membersection { wxDbTable::operator $ - - $ } \label { wxdbtableminusminus}
\func { bool} { operator $ - - $ } { \void }
Same as \helpref { wxDbTable::GetPrev} { wxdbtablegetprev}
\wxheading { See also}
\helpref { wxDbTable::GetPrev} { wxdbtablegetprev}
\section { \class { wxDbTableInf} } \label { wxdbtableinf}
Currently only used by wxDb::GetCatalog() internally and wxDbInf class,
but may be used in future releases for user functions. Contains information
describing the table (Name, type, etc). A pointer to a wxDbColInf array
instance is included so a program can create a wxDbColInf array instance
(using \helpref { wxDb::GetColumns} { wxdbgetcolumns} ) to maintain all information about the columns
of a table in one memory structure.
2000-08-08 06:11:51 +00:00