+\wxheading{Parameters}
+
+\docparam{tableName}{Name of the table on which to check privileges.
+{\it tableName} may refer to a table, view, alias or synonym.}
+\docparam{priv}{The table privilege being evaluated. May be one of the
+following (or a datasource specific privilege):}
+
+\begin{verbatim}
+ SELECT : The connected user is permitted to retrieve data for
+ one or more columns of the table.
+
+ INSERT : The connected user is permitted to insert new rows
+ containing data for one or more columns into the
+ table.
+
+ UPDATE : The connected user is permitted to update the data in
+ one or more columns of the table.
+
+ DELETE : The connected user is permitted to delete rows of
+ data from the table.
+
+ REFERENCES : Is the connected user permitted to refer to one or
+ more columns of the table within a constraint (for
+ example, a unique, referential, or table check
+ constraint).
+\end{verbatim}
+
+\docparam{userID}{{\it OPTIONAL.} User for which to determine if the privilege
+specified to be checked is granted or not. Default is "".
+{\it userID} is evaluated as follows:}
+
+\begin{verbatim}
+ userID == NULL ... NOT ALLOWED!
+ userID == "" ... UserID set equal to 'this->uid'
+ userID != "" ... UserID set equal to 'userID'
+\end{verbatim}
+
+\docparam{schema}{{\it OPTIONAL.} 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. Specifying the table owner makes determination of the
+users privileges MUCH faster. Default is NULL. {\it userID} is
+evaluated as follows:}
+
+\begin{verbatim}
+ schema == NULL ... Any owner (DEFAULT)
+ schema == "" ... Owned by 'this->uid'
+ schema != "" ... Owned by userID specified in 'schema'
+\end{verbatim}
+
+\docparam{path}{{\it OPTIONAL.} Path to the table. Default is "".
+Currently unused.}
+
+\wxheading{Remarks}
+
+The scope of privilege allowed to the connected user by a given table
+privilege is datasource dependent.
+
+For example, the privilege UPDATE might allow the connected user to update
+all columns in a table on one datasource, but only those columns for
+which the grantor (the user that granted the connected user) has the UPDATE
+privilege on another datasource.
+
+Looking up a user's privileges to a table can be time consuming depending on the
+datasource and ODBC driver. This time can be minimized by passing a {\it schema}
+as a parameter. With some datasources/drivers, the difference can be several
+seconds of time difference.
+
+
+\membersection{wxDb::TranslateSqlState}\label{wxdbtranslatesqlstate}
+
+\func{int }{TranslateSqlState}{\param{const wxString \&}{SQLState}}
+
+Converts an ODBC sqlstate to an internal error code.
+
+\wxheading{Parameters}
+
+\docparam{SQLState}{State to be converted.}
+
+\wxheading{Return value}
+
+Returns the internal class DB\_ERR code. See \helpref{wxDb::DB\_STATUS}{wxdb} definition.
+
+\membersection{wxDb::WriteSqlLog}\label{wxdbwritesqllog}
+
+\func{bool}{WriteSqlLog}{\param{const wxString \&}{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 (see
+(see \helpref{wxDb::SetSqlLogging}{wxdbsetsqllogging} for details on
+turning logging on/off). The passed in string {\it logMsg} will be written to
+a log file if SQL logging is turned on.
+
+\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}
+
+\section{\class{wxDbColDataPtr}}\label{wxdbcoldataptr}
+
+Pointer to dynamic column definitions for use with a wxDbTable instance.
+Currently there are no member functions for this class.
+
+See the \helpref{database classes overview}{odbcoverview} for
+an introduction to using the ODBC classes.
+
+\begin{verbatim}
+ void *PtrDataObj;
+ int SzDataObj;
+ SWORD SqlCtype;
+\end{verbatim}
+
+\section{\class{wxDbColDef}}\label{wxdbcoldef}
+
+This class is used to hold information about the columns bound to an
+instance of a wxDbTable object.
+
+Each instance of this class describes one column in the wxDbTable
+object. When calling the \helpref{wxDb constructor}{wxdbctor}, a
+parameter passed in indicates the number of columns that will be defined for
+the wxDbTable object. The constructor uses this information to allocate
+adequate memory for all of the column descriptions in your wxDbTable object.
+Private member wxDbTable::colDefs is a pointer to this chunk of memory
+maintained by the wxDbTable class (and can be retrieved using the
+\helpref{wxDbTable::GetColDefs}{wxdbtablegetcoldefs} function).
+To access the nth column definition of your wxDbTable object, just reference
+wxDbColDefs element [n - 1].
+
+Typically, \helpref{wxDbTable::SetColDefs}{wxdbtablesetcoldefs} is used to
+populate an array of these data structures for the wxDbTable instance.
+
+Currently there are no accessor functions for this class, so all members are
+public.
+
+\begin{verbatim}
+ wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name
+ int DbDataType; - Logical Data Type;
+ e.g. DB_DATA_TYPE_INTEGER
+ SWORD SqlCtype; - C data type; e.g. SQL_C_LONG
+ void *PtrDataObj; - Address of the data object
+ int SzDataObj; - Size, in bytes, of the data object
+ bool KeyField; - Is column part of the PRIMARY KEY for the
+ table? -- Date fields should NOT be
+ KeyFields
+ bool Updateable; - Column is updateable?
+ bool InsertAllowed; - Column included in INSERT statements?
+ bool DerivedCol; - Column is a derived value?
+ SDWORD CbValue; - !!!Internal use only!!!
+ bool Null; - NOT FULLY IMPLEMENTED
+ Allows NULL values in Inserts and Updates
+\end{verbatim}
+
+\wxheading{See also}
+
+\helpref{database classes overview}{odbcoverview},
+\helpref{wxDbTable::GetColDefs}{wxdbtablegetcoldefs}, \helpref{wxDb constructor}{wxdbctor}
+
+\wxheading{Include files}
+
+<wx/db.h>
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxDbColDef::Initialize}\label{wxdbcoldefinitialize}
+
+Simply initializes all member variables to a cleared state. Called by
+the constructor automatically.
+
+\section{\class{wxDbColFor}}\label{wxdbcolfor}
+
+Beginning support for handling international formatting specifically on dates
+and floats.
+
+\begin{verbatim}
+ wxString s_Field; // Formatted String for Output
+ wxString s_Format[7]; // Formatted Objects - TIMESTAMP has
+ the biggest (7)
+ wxString s_Amount[7]; // Formatted Objects - amount of
+ things that can be formatted
+ int i_Amount[7]; // Formatted Objects -
+ TT MM YYYY HH MM SS m
+ int i_Nation; // 0 = timestamp
+ 1 = EU
+ 2 = UK
+ 3 = International
+ 4 = US
+ int i_dbDataType; // conversion of the 'sqlDataType'
+ to the generic data type used by
+ these classes
+ SWORD i_sqlDataType;
+\end{verbatim}
+
+The constructor for this class initializes all the values to zero or NULL.
+
+The destructor does nothing at this time.
+
+Only one function is provided with this class currently.
+
+See the \helpref{database classes overview}{odbcoverview} for
+an introduction to using the ODBC classes.
+
+\wxheading{Include files}
+
+<wx/db.h>
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\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 eventually.
+
+\membersection{wxDbColFor::Initialize}\label{wxdbcolforinitialize}
+
+Simply initializes all member variables to a cleared state. Called by
+the constructor automatically.
+
+\section{\class{wxDbColInf}}\label{wxdbcolinf}
+
+Used with the \helpref{wxDb::GetColumns}{wxdbgetcolumns} functions for obtaining all retrievable information about a column's definition.
+
+\begin{verbatim}
+ wxChar catalog[128+1];
+ wxChar schema[128+1];
+ wxChar tableName[DB_MAX_TABLE_NAME_LEN+1];
+ wxChar colName[DB_MAX_COLUMN_NAME_LEN+1];
+ SWORD sqlDataType;
+ wxChar typeName[128+1];
+ SWORD columnSize;
+ SWORD bufferLength;
+ short decimalDigits;
+ short numPrecRadix;
+ short nullable;
+ wxChar remarks[254+1];
+ int dbDataType; // conversion of the 'sqlDataType'
+ // to the generic data type used by
+ // these classes
+ int PkCol; // Primary key column
+ 0 = No
+ 1 = First Key
+ 2 = Second Key, etc...
+ wxChar PkTableName[DB_MAX_TABLE_NAME_LEN+1];
+ // Tables that use this PKey as a FKey
+ int FkCol; // Foreign key column
+ 0 = No
+ 1 = First Key
+ 2 = Second Key, etc...
+ wxChar FkTableName[DB_MAX_TABLE_NAME_LEN+1];
+ // Foreign key table name
+ wxDbColFor *pColFor; // How should this column be formatted
+\end{verbatim}
+
+The constructor for this class initializes all the values to zero, "", or NULL.
+
+The destructor for this class takes care of deleting the pColFor member if
+it is non-NULL.
+
+See the \helpref{database classes overview}{odbcoverview} for
+an introduction to using the ODBC classes.
+
+\wxheading{Include files}
+
+<wx/db.h>
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxDbColInf::Initialize}\label{wxdbcolinfinitialize}
+
+Simply initializes all member variables to a cleared state. Called by
+the constructor automatically.
+
+\section{\class{wxDbConnectInf}}\label{wxdbconnectinf}
+
+This class is used for holding the data necessary for connecting to the ODBC
+datasource. That information includes: SQL environment handle, datasource
+name, user ID, password and default directory path (used with dBase). Other
+optional fields held in this class are and file type, both for future
+functions planned to be added for creating/manipulating datasource definitions.
+
+\membersection{wxDbConnectInf::wxDbConnectInf}\label{wxdbconnectinfctor}
+
+\func{}{wxDbConnectInf}{\void}
+
+Default constructor.
+
+\func{}{wxDbConnectInf}{\param{HENV }{henv}, \param{const wxString \&}{dsn},
+\param{const wxString \&}{userID=""}, \param{const wxString \&}{password},
+\param{const wxString \&}{defaultDir=""}, \param{const wxString \&}{description=""},
+\param{const wxString \&}{fileType=""}}
+
+Constructor which allows initial settings of all the classes member variables.
+
+See the special note below on the henv parameter for forcing this constructor
+to create a SQL environment handle automatically, rather than needing to pass
+one in to the function.
+
+\wxheading{Parameters}
+
+\docparam{henv}{Environment handle used for this connection. See\rtfsp
+\helpref{wxDConnectInf::AllocHenv}{wxdbconnectinfallochenv} for how to create
+an SQL environment handle. NOTE: Passing in a NULL for this parameter will
+inform the constructor that it should create its own SQL environment handle.
+If NULL is passed for this parameter, the constructor will call\rtfsp
+\helpref{wxDConnectInf::AllocHenv}{wxdbconnectinfallochenv} internally. A
+flag is set internally also to indicate that the HENV was created by the
+constructor so that when the default class destructor is called, the
+destructor will call \helpref{wxDConnectInf::FreeHenv}{wxdbconnectinffreehenv}\rtfsp
+to free the environment handle automatically.}
+\docparam{dsn}{Name of the datasource to be used in creating wxDb instances
+for creating connection(s) to a datasource.}
+\docparam{userID}{{\it OPTIONAL} Many datasources allow (or even require)
+use of a username to determine privileges that connecting user is allowed
+to have when accessing the datasource or the data tables. Default is "".}
+\docparam{password}{{\it OPTIONAL} Password to be associated with the user
+ID specified in 'userID'. Default is "".}
+\docparam{defaultDir}{{\it OPTIONAL} Used for datasources which require the
+path to where the data file is stored to be specified. dBase is one example
+of the type of datasource which requires this information. Default is "".}
+\docparam{description}{{\it OPTIONAL} {\bf FUTURE USE} Default is "".}
+\docparam{fileType}{{\it OPTIONAL} {\bf FUTURE USE} Default is "".}
+
+\wxheading{Remarks}
+
+It is strongly recommended that programs use the longer form of the
+constructor and allow the constructor to create the SQL environment handle
+automatically, and manage the destruction of the handle.
+
+\wxheading{Example}
+
+\begin{verbatim}
+ wxDbConnectInf *DbConnectInf;
+
+ DbConnectInf = new wxDbConnectInf(0,"MY_DSN", "MY_USER", "MY_PASSWORD");
+
+ ....the rest of the program
+
+ delete DbConnectInf;
+\end{verbatim}
+
+\wxheading{See also}
+
+\helpref{wxDConnectInf::AllocHenv}{wxdbconnectinfallochenv},
+\helpref{wxDConnectInf::FreeHenv}{wxdbconnectinffreehenv}
+
+\membersection{wxDbConnectInf::\destruct{wxDbConnectInf}}\label{wxdbconnectinfdestr}
+
+\func{}{\destruct{wxDbConnectInf}}{}
+
+Handles the default destruction of the instance of the class. If the long form
+of the \helpref{wxDConnectInf}{wxdbconnectinf} was used, then this destructor
+also takes care of calling\rtfsp
+\helpref{wxDConnectInf::FreeHenv}{wxdbconnectinffreehenv} to free the
+SQL environment handle.
+
+\membersection{wxDbConnectInf::AllocHenv}\label{wxdbconnectinfallochenv}
+
+\func{bool }{AllocHenv}{\void}
+
+Allocates a SQL environment handle that will be used to interface with
+an ODBC datasource.
+
+\wxheading{Remarks}
+
+This function can be automatically called by the long from of the
+\helpref{wxDbConnectInf}{wxdbconnectinf} constructor.
+
+\membersection{wxDbConnectInf::FreeHenv}\label{wxdbconnectinffreehenv}
+
+\func{void}{FreeHenv}{\void}
+
+Frees the SQL environment handle being managed by the instance of this class.
+
+\wxheading{Remarks}
+
+If the SQL environment handle was created using the long form of the\rtfsp
+\helpref{wxDbConnectInf}{wxdbconnectinf} constructor, then the flag indicating
+that the HENV should be destroyed when the classes destructor is called
+is reset to be false, so that any future handles created using the\rtfsp
+\helpref{wxDbConnectInf::AllocHenv}{wxdbconnectinfallochenv} function
+must be manually released with a call to this function.
+
+\membersection{wxDbConnectInf::Initialize}\label{wxdbconnectinfinitialize}
+
+Simply initializes all member variables to a cleared state. Called by
+the constructor automatically.
+
+\membersection{wxDbConnectInf::GetAuthStr}\label{wxdbconnectinfgetauthstr}
+
+\func{const wxChar *}{GetAuthStr}{\void}
+
+Accessor function to return the password assigned for this class
+instance that will be used with the user ID.
+
+Synonymous with \helpref{wxDbConnectInf::GetPassword}{wxdbconnectinfgetpassword}
+
+\membersection{wxDbConnectInf::GetDefaultDir}\label{wxdbconnectinfgetdefaultdir}
+
+\func{const wxChar *}{GetDefaultDir}{\void}
+
+Accessor function to return the default directory in which the datasource's data
+table is stored. This directory is only used for file based datasources like
+dBase. MS-Access does not require this to be set, as the path is set in the
+ODBC Administrator for MS-Access.
+
+\membersection{wxDbConnectInf::GetDescription}\label{wxdbconnectinfgetdescription}
+
+\func{const wxChar *}{GetDescription}{\void}
+
+Accessor function to return the description assigned for this class
+instance.
+
+NOTE: Description is a FUTURE USE item and is unused currently.
+
+\membersection{wxDbConnectInf::GetDsn}\label{wxdbconnectinfgetdsn}
+
+\func{const wxChar *}{GetDsn}{\void}
+
+Accessor function to return the datasource name assigned for this class
+instance.
+
+\membersection{wxDbConnectInf::GetFileType}\label{wxdbconnectinfgetfiletype}
+
+\func{const wxChar *}{GetFileType}{\void}
+
+Accessor function to return the filetype of the ODBC datasource assigned for
+this class instance.
+
+NOTE: FileType is a FUTURE USE item and is unused currently.
+
+\membersection{wxDbConnectInf::GetHenv}\label{wxdbconnectinfgethenv}
+
+\func{const HENV}{GetHenv}{\void}
+
+Accessor function to return the SQL environment handle being managed
+by this class instance.
+
+\membersection{wxDbConnectInf::GetPassword}\label{wxdbconnectinfgetpassword}
+
+\func{const wxChar *}{GetPassword}{\void}
+
+Accessor function to return the password assigned for this class
+instance that will be used with the user ID.
+
+Synonymous with \helpref{wxDbConnectInf::GetAuthStr}{wxdbconnectinfgetauthstr}
+
+\membersection{wxDbConnectInf::GetUid}\label{wxdbconnectinfgetuid}
+
+\func{const wxChar *}{GetUid}{\void}
+
+Accessor function to return the user ID assigned for this class
+instance.
+
+\membersection{wxDbConnectInf::GetUserID}\label{wxdbconnectinfgetuserid}
+
+\func{const wxChar *}{GetUserID}{\void}
+
+Accessor function to return the user ID assigned for this class
+instance.
+
+\membersection{wxDbConnectInf::SetAuthStr}\label{wxdbconnectinfsetauthstr}
+
+\func{\void}{SetAuthStr}{const wxString \&authstr}
+
+Accessor function to assign the password for this class
+instance that will be used with the user ID.
+
+Synonymous with \helpref{wxDbConnectInf::SetPassword}{wxdbconnectinfsetpassword}
+
+\membersection{wxDbConnectInf::SetDefaultDir}\label{wxdbconnectinfsetdefaultdir}
+
+\func{\void}{SetDefaultDir}{const wxString \&defDir}
+
+Accessor function to assign the default directory in which the datasource's data
+table is stored. This directory is only used for file based datasources like
+dBase. MS-Access does not require this to be set, as the path is set in the
+ODBC Administrator for MS-Access.
+
+\membersection{wxDbConnectInf::SetDescription}\label{wxdbconnectinfsetdescription}
+
+\func{\void}{SetDescription}{const wxString \&desc}
+
+Accessor function to assign the description assigned for this class
+instance.
+
+NOTE: Description is a FUTURE USE item and is unused currently.
+
+\membersection{wxDbConnectInf::SetDsn}\label{wxdbconnectinfsetdsn}
+
+\func{\void}{SetDsn}{const wxString \&dsn}
+
+Accessor function to assign the datasource name for this class instance.
+
+\membersection{wxDbConnectInf::SetFileType}\label{wxdbconnectinfsetfiletype}
+
+\func{\void}{SetFileType}{const wxString \&}
+
+Accessor function to return the filetype of the ODBC datasource assigned for
+this class instance.
+
+NOTE: FileType is a FUTURE USE item and is unused currently.
+
+\membersection{wxDbConnectInf::SetHenv}\label{wxdbconnectinfsethenv}
+
+\func{void}{SetHenv}{\param{const HENV }{henv}}
+
+Accessor function to set the SQL environment handle for this class instance.
+
+\membersection{wxDbConnectInf::SetPassword}\label{wxdbconnectinfsetpassword}
+
+\func{\void}{SetPassword}{const wxString \&password}
+
+Accessor function to assign the password for this class
+instance that will be used with the user ID.
+
+Synonymous with \helpref{wxDbConnectInf::SetAuthStr}{wxdbconnectinfsetauthstr}
+
+\membersection{wxDbConnectInf::SetUid}\label{wxdbconnectinfsetuid}
+
+\func{\void}{SetUid}{const wxString \&uid}
+
+Accessor function to set the user ID for this class instance.
+
+\membersection{wxDbConnectInf::SetUserID}\label{wxdbconnectinfsetuserid}
+
+\func{\void}{SetUserID}{const wxString \&userID}
+
+Accessor function to assign the user ID for this class instance.
+
+\section{\class{wxDbIdxDef}}\label{wxdbidxdef}
+
+Used in creation of non-primary indexes. Currently there are no member
+functions for this class.
+
+\begin{verbatim}
+ wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1]
+ // Name of column
+ bool Ascending // Is index maintained in
+ ASCENDING sequence?
+\end{verbatim}
+
+There are no constructors/destructors as of this time, and no member functions.
+
+See the \helpref{database classes overview}{odbcoverview} for
+an introduction to using the ODBC classes.
+
+
+\wxheading{Include files}
+
+<wx/db.h>
+
+\section{\class{wxDbInf}}\label{wxdbinf}
+
+Contains information regarding the database connection (datasource 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.
+
+Primarily, this class is used internally by the wxWidgets ODBC classes.
+
+\begin{verbatim}
+ wxChar catalog[128+1];
+ wxChar schema[128+1]; // typically means owner of table(s)
+ int numTables; // How many tables does this
+ datasource have
+ wxDbTableInf *pTableInf; // Equals a new
+ wxDbTableInf[numTables];
+\end{verbatim}
+
+The constructor for this class initializes all the values to zero, "", or NULL.
+
+The destructor for this class takes care of deleting the pTableInf member if
+it is non-NULL.
+
+See the \helpref{database classes overview}{odbcoverview} for
+an introduction to using the ODBC classes.
+
+\wxheading{Include files}
+
+<wx/db.h>
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxDbInf::Initialize}\label{wxdbinfinitialize}
+
+Simply initializes all member variables to a cleared state. Called by
+the constructor automatically.
+
+\section{\class{wxDbTable}}\label{wxdbtable}
+
+A wxDbTable instance provides re-usable access to rows of data in
+a table contained within the associated ODBC datasource
+
+See the \helpref{database classes overview}{odbcoverview} for
+an introduction to using the ODBC classes.
+
+\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{itemize}\itemsep=0pt
+\item \helpref{wxDbColDef}{wxdbcoldef}
+\item \helpref{wxDbColDataPtr}{wxdbcoldataptr}
+\item \helpref{wxDbIdxDef}{wxdbidxdef}
+\end{itemize}
+
+\wxheading{Constants}
+
+\begin{verbatim}
+ wxDB_DEFAULT_CURSOR Primary cursor normally used for cursor based
+ operations.
+
+ 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.
+
+ wxDB_ROWID_LEN [Oracle only] - Used when CanUpdateByRowID()
+ is true. Optimizes updates so they are faster
+ by updating on the Oracle-specific ROWID column
+ rather than some other index.
+
+
+ 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}
+
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxDbTable::wxDbTable}\label{wxdbtableconstr}
+
+\func{}{wxDbTable}{\param{wxDb *}{pwxDb}, \param{const wxString \&}{tblName},
+ \param{const UWORD }{numColumns}, \param{const wxString \&}{qryTblName = ""},
+ \param{bool }{qryOnly = !wxDB\_QUERY\_ONLY}, \param{const wxString \&}{tblPath = ""}}
+
+Default constructor.
+
+\wxheading{Parameters}
+
+\docparam{pwxDb}{Pointer to the wxDb instance to be used by this wxDbTable
+instance.}
+\docparam{tblName}{The name of the table in the RDBMS.}
+\docparam{numColumns}{The number of columns in the table. (Do NOT include the ROWID
+column in the count if using Oracle).}
+\docparam{qryTblName}{{\it OPTIONAL}. The name of the table or view to base
+your queries on. This argument allows you to specify a table/view other than
+the base table for this object to base your queries on. This allows you to
+query on a view for example, but all of the INSERT, UPDATE and DELETES will
+still be performed on the base table for this wxDbTable object. Basing your
+queries on a view can provide a substantial performance increase in cases where
+your queries involve many tables with multiple joins. Default is "".}
+\docparam{qryOnly}{{\it OPTIONAL}. Indicates whether the table will be
+accessible for query purposes only, or should the table create the necessary
+cursors to be able to insert, update, and delete data from the table.
+Default is !wxDB\_QUERY\_ONLY.}
+\docparam{tblPath}{{\it OPTIONAL}. Some datasources (such as dBase)
+require a path to where the table is stored on the system. Default is "".}
+
+\membersection{wxDbTable::wxDbTable}\label{wxdbtabledestr}
+
+\func{virtual}{\destruct{wxDbTable}}{}
+
+Virtual default destructor.
+
+\membersection{wxDbTable::BuildDeleteStmt}\label{wxdbtablebuilddeletestmt}
+
+\func{void}{BuildDeleteStmt}{\param{wxString \&}{pSqlStmt},
+\param{int }{typeOfDel}, \param{const wxString \&}{pWhereClause=""}}
+
+Constructs the full SQL statement that can be used to delete all rows matching
+the criteria in the pWhereClause.
+
+\wxheading{Parameters}
+
+\docparam{pSqlStmt}{Pointer to buffer for the SQL statement retrieved. To be
+sure you have adequate space allocated for the SQL statement, allocate
+DB\_MAX\_STATEMENT\_LEN bytes.}
+\docparam{typeOfDel}{The type of delete statement being performed. Can be one
+of three values: DB\_DEL\_KEYFIELDS, DB\_DEL\_WHERE or DB\_DEL\_MATCHING}
+\docparam{pWhereClause}{{\it OPTIONAL}. If the typeOfDel is DB\_DEL\_WHERE,
+then you must also pass in a SQL WHERE clause in this argument. Default
+is "".}
+
+\wxheading{Remarks}
+
+This member function constructs a SQL DELETE statement. This can be used for
+debugging purposes if you are having problems executing your SQL statement.
+
+WHERE and FROM clauses specified using \helpref{wxDbTable::SetWhereClause}{wxdbtablesetwhereclause}
+and \helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause} are ignored by
+this function.
+
+\membersection{wxDbTable::BuildSelectStmt}\label{wxdbtablebuildselectstmt}
+
+\func{void}{BuildSelectStmt}{\param{wxString \&}{pSqlStmt},
+\param{int }{typeOfSelect}, \param{bool }{distinct}}
+
+Constructs the full SQL statement that can be used to select all rows matching
+the criteria in the pWhereClause. This function is called internally in the
+wxDbTable class whenever the function \helpref{wxDbTable::Query}{wxdbtablequery}
+is called.
+
+NOTE: Only the columns specified in \helpref{wxDbTable::SetColDefs}{wxdbtablesetcoldefs}
+statements are included in the list of columns returned by the SQL statement
+created by a call to this function.
+
+\wxheading{Parameters}
+
+\docparam{pSqlStmt}{Pointer to storage for the SQL statement retrieved. To be
+sure you have adequate space allocated for the SQL statement, allocate
+DB\_MAX\_STATEMENT\_LEN bytes.}
+\docparam{typeOfSelect}{The type of select statement being performed. Can be
+one of four values: DB\_SELECT\_KEYFIELDS, DB\_SELECT\_WHERE, DB\_SELECT\_MATCHING
+or DB\_SELECT\_STATEMENT.}
+\docparam{distinct}{Whether to select distinct records only.}
+
+\wxheading{Remarks}
+
+This member function constructs a SQL SELECT statement. This can be used for
+debugging purposes if you are having problems executing your SQL statement.
+
+WHERE and FROM clauses specified using
+\helpref{wxDbTable::SetWhereClause}{wxdbtablesetwhereclause}
+and \helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause} are ignored by
+this function.
+
+\membersection{wxDbTable::BuildUpdateStmt}\label{wxdbtablebuildupdatestmt}
+
+\func{void}{BuildUpdateStmt}{\param{wxString \&}{pSqlStmt}, \param{int }{typeOfUpd},
+\param{const wxString \&}{pWhereClause=""}}
+
+Constructs the full SQL statement that can be used to update all rows matching
+the criteria in the pWhereClause.
+
+If typeOfUpdate is DB\_UPD\_KEYFIELDS, then the current values in the bound columns
+are used to determine which row(s) in the table are to be updated. The
+exception to this is when a datasource supports ROW IDs (Oracle). The ROW ID
+column is used for efficiency purposes when available.
+
+NOTE: Only the columns specified in \helpref{wxDbTable::SetColDefs}{wxdbtablesetcoldefs}
+statements are included in the list of columns updated by the SQL statement
+created by a call to this function. Any column definitions that were defined
+as being non-updateable will be excluded from the SQL UPDATE statement created
+by this function.
+
+\wxheading{Parameters}
+
+\docparam{pSqlStmt}{Pointer to storage for the SQL statement retrieved. To be
+sure you have adequate space allocated for the SQL statement, allocate
+DB\_MAX\_STATEMENT\_LEN bytes.}
+\docparam{typeOfUpdate}{The type of update statement being performed. Can be one
+of two values: DB\_UPD\_KEYFIELDS or DB\_UPD\_WHERE.}
+\docparam{pWhereClause}{{\it OPTIONAL}. If the typeOfUpdate is DB\_UPD\_WHERE,
+then you must also pass in a SQL WHERE clause in this argument. Default is "".}
+
+\wxheading{Remarks}
+
+This member function allows you to see what the SQL UPDATE statement looks like
+that the ODBC class library builds. This can be used for debugging purposes if
+you are having problems executing your SQL statement.
+
+WHERE and FROM clauses specified using \helpref{wxDbTable::SetWhereClause}{wxdbtablesetwhereclause}
+and \helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause} are ignored by
+this function.
+
+
+\membersection{wxDbTable::BuildWhereClause}\label{wxdbtablebuildwhereclause}
+
+\func{void}{BuildWhereClause}{\param{wxString \&}{pWhereClause},
+\param{int }{typeOfWhere}, \param{const wxString \&}{qualTableName=""},
+\param{bool }{useLikeComparison=false}}
+
+Constructs the portion of a SQL statement which would follow the word 'WHERE'
+in a SQL statement to be passed to the datasource. The returned string
+does NOT include the word 'WHERE'.
+
+\wxheading{Parameters}
+
+\docparam{pWhereClause}{Pointer to storage for the SQL statement retrieved.
+To be sure you have adequate space allocated for the SQL statement, allocate
+DB\_MAX\_STATEMENT\_LEN bytes.}
+\docparam{typeOfWhere}{The type of where clause to generate. Can be one of
+two values: DB\_WHERE\_KEYFIELDS or DB\_WHERE\_MATCHING.}
+\docparam{qualTableName}{{\it OPTIONAL}. Prepended to all base table
+column names. For use when a FROM clause has been specified with the
+\helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause},
+to clarify which table a column name reference belongs to. Default is "".}
+\docparam{useLikeComparison}{{\it OPTIONAL}. Should the constructed WHERE
+clause utilize the LIKE comparison operator. If false, then the '='
+operator is used. Default is false.}
+
+\wxheading{Remarks}
+
+This member function allows you to see what the SQL WHERE clause looks like
+that the ODBC class library builds. This can be used for debugging purposes
+if you are having problems executing your own SQL statements.
+
+If using 'typeOfWhere' set to DB\_WHERE\_MATCHING, any bound columns currently
+containing a NULL value are not included in the WHERE clause's list of
+columns to use in the comparison.
+
+
+\membersection{wxDbTable::CanSelectForUpdate}\label{wxdbtablecanselectforupdate}
+
+\func{bool}{CanSelectForUpdate}{\void}
+
+Use this function to determine if the datasource supports SELECT ... FOR UPDATE.
+When the keywords "FOR UPDATE" are included as part of your SQL SELECT statement,
+all records {\it retrieved} (not just queried, but actually retrieved using
+\helpref{wxDbTable::GetNext}{wxdbtablegetnext}, etc) from the result set are
+locked.
+
+\wxheading{Remarks}
+
+Not all datasources support the "FOR UPDATE" clause, so you must use this
+member function to determine if the datasource currently connected to supports
+this behavior or not before trying to select using "FOR UPDATE".
+
+If the wxDbTable instance was created with the parameter wxDB\_QUERY\_ONLY, then
+this function will return false. For all known databases which do not support
+the FOR UPDATE clause, this function will return false also.
+
+\membersection{wxDbTable::CanUpdateByROWID}\label{wxdbtablecanupdatebyrowid}
+
+\func{bool}{CanUpdateByROWID}{\void}
+
+CURRENTLY ONLY POSSIBLE IF USING ORACLE.
+
+--- CURRENTLY DISABLED FOR *ALL* DATASOURCES --- NOV 1 2000 - gt
+
+Every Oracle table has a hidden column named ROWID. This is a pointer to the
+physical location of the record in the datasource and allows for very fast
+updates and deletes. The key is to retrieve this ROWID during your query so
+it is available during an update or delete operation.
+
+Use of the ROWID feature is always handled by the class library except in the
+case of \helpref{wxDbTable::QueryBySqlStmt}{wxdbtablequerybysqlstmt}. Since
+you are passing in the SQL SELECT statement,
+it is up to you to include the ROWID column in your query. If you do not,
+the application will still work, but may not be as optimized. The ROWID is
+always the last column in the column list in your SQL SELECT statement.
+The ROWID is not a column in the normal sense and should not be considered
+part of the column definitions for the wxDbTable object.
+
+\wxheading{Remarks}
+
+The decision to include the ROWID in your SQL SELECT statement must be
+deferred until runtime since it depends on whether you are connected
+to an Oracle datasource or not.
+
+\wxheading{Example}
+
+\begin{verbatim}
+ // Incomplete code sample
+ wxDbTable parts;
+ .....
+ if (parts.CanUpdateByROWID())
+ {
+ // Note that the ROWID column must always be the last column selected
+ sqlStmt = "SELECT PART_NUM, PART_DESC, ROWID" FROM PARTS";
+ }
+ else
+ sqlStmt = "SELECT PART_NUM, PART_DESC FROM PARTS";
+\end{verbatim}
+
+
+\membersection{wxDbTable::ClearMemberVar}\label{wxdbtableclearmembervar}
+
+\func{void}{ClearMemberVar}{\param{UWORD }{colNumber}, \param{bool }{setToNull=false}}
+
+Same as \helpref{wxDbTable::ClearMemberVars}{wxdbtableclearmembervars} except
+that this function clears only the specified column of its values, and
+optionally sets the column to be a NULL column.
+
+\docparam{colNumber}{Column number that is to be cleared. This number (between 0
+and (numColumns-1)) is the index of the column definition created using the
+\helpref{wxDbTable::SetColDefs}{wxdbtablesetcoldefs} function.}
+\docparam{setToNull}{{\it OPTIONAL}. Indicates whether the column should be
+flagged as being a NULL value stored in the bound memory variable. If true,
+then any value stored in the bound member variable is cleared. Default is
+false.}
+
+\membersection{wxDbTable::ClearMemberVars}\label{wxdbtableclearmembervars}
+
+\func{void}{ClearMemberVars}{\param{bool }{setToNull=false}}
+
+Initializes all bound columns of the wxDbTable instance to zero. In the case
+of a string, zero is copied to the first byte of the string.
+
+\docparam{setToNull}{{\it OPTIONAL}. Indicates whether all columns should be
+flagged as having a NULL value stored in the bound memory variable. If true,
+then any value stored in the bound member variable is cleared. Default is
+false.}
+
+\wxheading{Remarks}
+
+This is useful before calling functions such as
+\helpref{wxDbTable::QueryMatching}{wxdbtablequerymatching} or
+\helpref{wxDbTable::DeleteMatching}{wxdbtabledeletematching} since these
+functions build their WHERE clauses from non-zero columns. To call either
+\helpref{wxDbTable::QueryMatching}{wxdbtablequerymatching} or
+\helpref{wxDbTable::DeleteMatching}{wxdbtabledeletematching} use this sequence:
+
+\begin{verbatim}
+1) ClearMemberVars()
+2) Assign columns values you wish to match on
+3) Call wxDbTable::QueryMatching() or wxDbTable::DeleteMatching()
+\end{verbatim}
+
+\membersection{wxDbTable::CloseCursor}\label{wxdbtableclosecursor}
+
+\func{bool}{CloseCursor}{\param{HSTMT}{cursor}}
+
+Closes the specified cursor associated with the wxDbTable object.
+
+\wxheading{Parameters}
+
+\docparam{cursor}{The cursor to be closed.}
+
+\wxheading{Remarks}
+
+Typically handled internally by the ODBC class library, but may be used by the
+programmer if desired.
+
+\normalbox{DO NOT CLOSE THE wxDB\_DEFAULT\_CURSOR!}
+
+\membersection{wxDbTable::Count}\label{wxdbtablecount}
+
+\func{ULONG }{Count}{\param{const wxString \&}{args="*"}}
+
+Returns the number of records which would be in the result set using the
+current query parameters specified in the WHERE and FROM clauses.
+
+\wxheading{Parameters}
+
+\docparam{args}{{\it OPTIONAL}. This argument allows the use of the
+DISTINCT keyword against a column name to cause the returned count to
+only indicate the number of rows in the result set that have a unique
+value in the specified column. An example is shown below. Default is "*",
+meaning a count of the total number of rows matching is returned, regardless
+of uniqueness.}
+
+\wxheading{Remarks}
+
+This function can be called before or after an actual query to obtain the
+count of records in the result set. Count() uses its own cursor, so result
+set cursor positioning is not affected by calls to Count().
+
+WHERE and FROM clauses specified using
+\helpref{wxDbTable::SetWhereClause}{wxdbtablesetwhereclause}
+and \helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause} ARE used by
+this function.
+
+\wxheading{Example}
+
+\begin{verbatim}
+
+ USERS TABLE
+
+ FIRST_NAME LAST_NAME
+ ----------- ----------
+ John Doe
+ Richard Smith
+ Michael Jones
+ John Carpenter
+
+ // Incomplete code sample
+ wxDbTable users;
+ .....
+ users.SetWhereClause("");
+
+ // This Count() will return 4, as there are four users listed above
+ // that match the query parameters
+ totalNumberOfUsers = users.Count();
+
+ // This Count() will return 3, as there are only 3 unique first names
+ // in the table above - John, Richard, Michael.
+ totalNumberOfUniqueFirstNames = users.Count("DISTINCT FIRST_NAME");
+\end{verbatim}
+
+\membersection{wxDbTable::CreateIndex}\label{wxdbtablecreateindex}
+
+\func{bool}{CreateIndex}{\param{const wxString \&}{IndexName}, \param{bool }{unique},
+\param{UWORD }{numIndexColumns}, \param{wxDbIdxDef *}{pIndexDefs},
+\param{bool }{attemptDrop=true}}
+
+This member function allows you to create secondary (non-primary) indexes on
+your tables. You first create your table, normally specifying a primary
+index, and then create any secondary indexes on the table. Indexes in
+relational model are not required. You do not need indexes to look up records
+in a table or to join two tables together. In the relational model, indexes,
+if available, provide a quicker means to look up data in a table. To enjoy
+the performance benefits of indexes, the indexes must be defined on the
+appropriate columns and your SQL code must be written in such a way as to
+take advantage of those indexes.
+
+\wxheading{Parameters}
+
+\docparam{IndexName}{Name of the Index. Name must be unique within the table
+space of the datasource.}
+\docparam{unique}{Indicates if this index is unique.}
+\docparam{numIndexColumns}{Number of columns in the index.}
+\docparam{pIndexDefs}{A pointer to an array \helpref{wxDbIdxDef}{wxdbidxdef} structures. }
+\docparam{attemptDrop}{{\it OPTIONAL}. Indicates if the function should try
+to execute a \helpref{wxDbTable::DropIndex}{wxdbtabledropindex} on the index
+name provided before trying to create the index name. Default is true.}
+
+\wxheading{Remarks}
+
+The first parameter, index name, must be unique and should be given a
+meaningful name. Common practice is to include the table name as a prefix
+in the index name (e.g. For table PARTS, you might want to call your index
+PARTS\_Index1). This will allow you to easily view all
+of the indexes defined for a given table grouped together alphabetically.
+
+The second parameter indicates if the index is unique or not. Uniqueness
+is enforced at the RDBMS level preventing rows which would have duplicate
+indexes from being inserted into the table when violating a unique index's
+uniqueness.
+
+In the third parameter, specify how many columns are in your index. This
+number must match the number of columns defined in the 'pIndexDefs' parameter.
+
+The fourth parameter specifies which columns make up the index using the
+\helpref{wxDbIdxDef}{wxdbidxdef} structure. For each column in the index, you must specify two
+things, the column name and the sort order (ascending / descending). See
+the example below to see how to build and pass in the \helpref{wxDbIdxDef}{wxdbidxdef} structure.
+
+The fifth parameter is provided to handle the differences in datasources as
+to whether they will automatically overwrite existing indexes with the same
+name or not. Some datasources require that the existing index must be dropped
+first, so this is the default behavior.
+
+Some datasources (MySQL, and possibly others) require columns which are to be
+part of an index to be defined as NOT NULL. When this function is called, if
+a column is not defined to be NOT NULL, a call to this function will modify
+the column definition to change any columns included in the index to be
+NOT NULL. In this situation, if a NULL value already exists in one of the
+columns that is being modified, creation of the index will fail.
+
+PostGres is unable to handle index definitions which specify whether the index
+is ascending or descending, and defaults to the system default when the index
+is created.
+
+It is not necessary to call \helpref{wxDb::CommitTrans}{wxdbcommittrans}
+after executing this function.
+
+\wxheading{Example}
+
+\begin{verbatim}
+ // Create a secondary index on the PARTS table
+ wxDbIdxDef IndexDef[2]; // 2 columns make up the index
+
+ wxStrcpy(IndexDef[0].ColName, "PART_DESC"); // Column 1
+ IndexDef[0].Ascending = true;
+
+ wxStrcpy(IndexDef[1].ColName, "SERIAL_NO"); // Column 2
+ IndexDef[1].Ascending = false;
+
+ // Create a name for the index based on the table's name
+ wxString indexName;
+ indexName.Printf("%s_Index1",parts->GetTableName());
+ parts->CreateIndex(indexName, true, 2, IndexDef);
+\end{verbatim}
+
+\membersection{wxDbTable::CreateTable}\label{wxdbtablecreatetable}
+
+\func{bool}{CreateTable}{\param{bool }{attemptDrop=true}}
+
+Creates a table based on the definitions previously defined for this
+wxDbTable instance.
+
+\wxheading{Parameters}
+
+\docparam{attemptDrop}{{\it OPTIONAL}. Indicates whether the driver should
+attempt to drop the table before trying to create it. Some datasources will
+not allow creation of a table if the table already exists in the table space
+being used. Default is true.}
+
+\wxheading{Remarks}
+
+This function creates the table and primary index (if any) in the table space
+associated with the connected datasource. The owner of these objects will
+be the user id that was given when \helpref{wxDb::Open}{wxdbopen} was called.
+The objects will be created in the default schema/table space for that user.
+
+In your derived wxDbTable object constructor, the columns and primary index
+of the table are described through the \helpref{wxDbColDef}{wxdbcoldef} structure.
+\helpref{wxDbTable::CreateTable}{wxdbtablecreatetable} uses this information
+to create the table and to add the primary index. See
+\helpref{wxDbTable}{wxdbtable} ctor and wxDbColDef description for additional
+information on describing the columns of the table.
+
+It is not necessary to call \helpref{wxDb::CommitTrans}{wxdbcommittrans}
+after executing this function.
+
+\membersection{wxDbTable::DB\_STATUS}\label{wxdbtabledbstatus}
+
+\func{bool}{DB\_STATUS}{\void}
+
+Accessor function that returns the wxDb private member variable DB\_STATUS for
+the database connection used by this instance of wxDbTable.
+
+\membersection{wxDbTable::Delete}\label{wxdbtabledelete}
+
+\func{bool}{Delete}{\void}
+
+Deletes the row from the table indicated by the current cursor.
+
+\wxheading{Remarks}
+
+Use \helpref{wxDbTable::GetFirst}{wxdbtablegetfirst},
+\helpref{wxDbTable::GetLast}{wxdbtablegetlast},
+\helpref{wxDbTable::GetNext}{wxdbtablegetnext} or
+\helpref{wxDbTable::GetPrev}{wxdbtablegetprev} to position the cursor to
+a valid record. Once positioned on a record, call this function to delete
+the row from the table.
+
+A \helpref{wxDb::CommitTrans}{wxdbcommittrans} or
+\helpref{wxDb::RollbackTrans}{wxdbrollbacktrans} must be called after use of
+this function to commit or rollback the deletion.
+
+NOTE: Most datasources have a limited size "rollback" segment. This means
+that it is only possible to insert/update/delete a finite number of rows
+without performing a \helpref{wxDb::CommitTrans}{wxdbcommittrans} or
+\helpref{wxDb::RollbackTrans}{wxdbrollbacktrans}. Size of the rollback
+segment varies from database to database, and is user configurable in
+most databases. Therefore it is usually best to try to perform a commit
+or rollback at relatively small intervals when processing a larger number
+of actions that insert/update/delete rows in a table.
+
+\membersection{wxDbTable::DeleteCursor}\label{wxdbtabledeletecursor}
+
+\func{bool}{DeleteCursor}{\param{HSTMT *}{hstmtDel}}
+
+Allows a program to delete a cursor.
+
+\wxheading{Parameters}
+
+\docparam{hstmtDel}{Handle of the cursor to delete.}
+
+\wxheading{Remarks}
+
+For default cursors associated with the instance of wxDbTable, it is not
+necessary to specifically delete the cursors. This is automatically done
+in the wxDbTable destructor.
+
+NOTE: If the cursor could not be deleted for some reason, an error is logged
+indicating the reason. Even if the cursor could not be deleted, the HSTMT
+that is passed in is deleted, and the pointer is set to NULL.
+
+\normalbox{DO NOT DELETE THE wxDB\_DEFAULT\_CURSOR!}
+
+\membersection{wxDbTable::DeleteMatching}\label{wxdbtabledeletematching}
+
+\func{bool}{DeleteMatching}{\void}
+
+This member function allows you to delete records from your wxDbTable object
+by specifying the data in the columns to match on.
+
+\wxheading{Remarks}
+
+To delete all users with a first name of "JOHN", do the following:
+
+\begin{enumerate}\itemsep=0pt
+\item Clear all "columns" using wxDbTable::ClearMemberVars().
+\item Set the FIRST\_NAME column equal to "JOHN".
+\item Call wxDbTable::DeleteMatching().
+\end{enumerate}
+
+The WHERE clause is built by the ODBC class library based on all non-NULL
+columns. This allows deletion of records by matching on any column(s) in
+your wxDbTable instance, without having to write the SQL WHERE clause.
+
+A \helpref{wxDb::CommitTrans}{wxdbcommittrans} or
+\helpref{wxDb::RollbackTrans}{wxdbrollbacktrans} must be called after use of
+this function to commit or rollback the deletion.
+
+NOTE: Row(s) should be locked before deleting them to make sure they are
+not already in use. This can be achieved by calling
+\helpref{wxDbTable::QueryMatching}{wxdbtablequerymatching},
+and then retrieving the records, locking each as you go (assuming FOR UPDATE
+is allowed on the datasource). After the row(s) have been successfully locked,
+call this function.
+
+NOTE: Most datasources have a limited "rollback" segment. This means
+that it is only possible to insert/update/delete a finite number of rows
+without performing a \helpref{wxDb::CommitTrans}{wxdbcommittrans} or
+\helpref{wxDb::RollbackTrans}{wxdbrollbacktrans}. Size of the rollback
+segment varies from database to database, and is user configurable in
+most databases. Therefore it is usually best to try to perform a commit
+or rollback at relatively small intervals when processing a larger number
+of actions that insert/update/delete rows in a table.
+
+\wxheading{Example}
+
+\begin{verbatim}
+ // Incomplete code sample to delete all users with a first name
+ // of "JOHN"
+ users.ClearMemberVars();
+ wxStrcpy(users.FirstName,"JOHN");
+ users.DeleteMatching();
+\end{verbatim}
+
+
+\membersection{wxDbTable::DeleteWhere}\label{wxdbtabledeletewhere}
+
+\func{bool}{DeleteWhere}{\param{const wxString \&}{pWhereClause}}
+
+Deletes all rows from the table which match the criteria specified in the
+WHERE clause that is passed in.
+
+\wxheading{Parameters}
+
+\docparam{pWhereClause}{SQL WHERE clause. This WHERE clause determines which
+records will be deleted from the table interfaced through the wxDbTable
+instance. The WHERE clause passed in must be compliant with the SQL 92
+grammar. Do not include the keyword 'WHERE'
+}
+
+\wxheading{Remarks}
+
+This is the most powerful form of the wxDbTable delete functions. This
+function gives access to the full power of SQL. This function can be used
+to delete records by passing a valid SQL WHERE clause. Sophisticated
+deletions can be performed based on multiple criteria using the full
+functionality of the SQL language.
+
+A \helpref{wxDb::CommitTrans}{wxdbcommittrans} must be called after use of
+this function to commit the deletions.
+
+Note: This function is limited to deleting records from the table associated
+with this wxDbTable object only. Deletions on joined tables is not possible.
+
+NOTE: Most datasources have a limited size "rollback" segment. This means
+that it is only possible to insert/update/delete a finite number of rows
+without performing a \helpref{wxDb::CommitTrans}{wxdbcommittrans} or
+\helpref{wxDb::RollbackTrans}{wxdbrollbacktrans}. Size of the rollback
+segment varies from database to database, and is user configurable in
+most databases. Therefore it is usually best to try to perform a commit
+or rollback at relatively small intervals when processing a larger number
+of actions that insert/update/delete rows in a table.
+
+WHERE and FROM clauses specified using \helpref{wxDbTable::SetWhereClause}{wxdbtablesetwhereclause}
+and \helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause} are ignored by
+this function.
+
+\wxheading{Example}
+
+\begin{verbatim}
+ // Delete parts 1 thru 10 from containers 'X', 'Y' and 'Z' that
+ // are magenta in color
+ parts.DeleteWhere("(PART_NUMBER BETWEEN 1 AND 10) AND \
+ CONTAINER IN ('X', 'Y', 'Z') AND \
+ UPPER(COLOR) = 'MAGENTA'");
+\end{verbatim}
+
+
+\membersection{wxDbTable::DropIndex}\label{wxdbtabledropindex}
+
+\func{bool}{DropIndex}{\param{const wxString \&}{IndexName}}
+
+Allows an index on the associated table to be dropped (deleted) if the user
+login has sufficient privileges to do so.
+
+\wxheading{Parameters}
+
+\docparam{IndexName}{Name of the index to be dropped.}
+
+\wxheading{Remarks}
+
+If the index specified in the 'IndexName' parameter does not exist, an error
+will be logged, and the function will return a result of false.
+
+It is not necessary to call \helpref{wxDb::CommitTrans}{wxdbcommittrans}
+after executing this function.
+
+\membersection{wxDbTable::DropTable}\label{wxdbtabledroptable}
+
+\func{bool}{DropTable}{\void}
+
+Deletes the associated table if the user has sufficient privileges to do so.
+
+\wxheading{Remarks}
+
+This function returns true if the table does not exist, but only for
+supported databases (see \helpref{wxDb::Dbms}{wxdbdbms}). If a datasource
+is not specifically supported, and this function is called, the function
+will return false.
+
+Most datasources/ODBC drivers will delete any indexes associated with the
+table automatically, and others may not. Check the documentation for your
+database to determine the behavior.
+
+It is not necessary to call \helpref{wxDb::CommitTrans}{wxdbcommittrans}
+after executing this function.
+
+\membersection{wxDbTable::From}\label{wxdbtablefrom}
+
+\func{const wxString \&}{From}{}
+
+\func{void}{From}{\param{const wxString \&}{From}}
+
+Accessor function for the private class member wxDbTable::from. Can be used
+as a synonym for \helpref{wxDbTable::GetFromClause}{wxdbtablegetfromclause}
+(the first form of this function) or
+\helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause} (the second form
+of this function).
+
+\wxheading{Parameters}
+
+\docparam{From}{A comma separated list of table names that are to be inner
+joined with the base table's columns so that the joined table's columns
+may be returned in the result set or used as a portion of a comparison with
+the base table's columns. NOTE that the base tables name must NOT be included
+in the FROM clause, as it is automatically included by the wxDbTable class
+in constructing query statements.}
+
+\wxheading{Return value}
+
+The first form of this function returns the current value of the wxDbTable
+member variable ::from.
+
+The second form of the function has no return value, as it will always set
+the from clause successfully.
+
+\wxheading{See also}
+
+\helpref{wxDbTable::GetFromClause}{wxdbtablegetfromclause},
+\helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause}
+
+
+\membersection{wxDbTable::GetColDefs}\label{wxdbtablegetcoldefs}
+
+\func{wxDbColDef *}{GetColDefs}{}
+
+Accessor function that returns a pointer to the array of column definitions
+that are bound to the columns that this wxDbTable instance is associated
+with.
+
+To determine the number of elements pointed to by the returned
+\helpref{wxDbColDef}{wxdbcoldef} pointer, use the
+\helpref{wxDbTable::GetNumberOfColumns}{wxdbtablegetnumberofcolumns} function.
+
+\wxheading{Remarks}
+
+These column definitions must not be manually redefined after they have been
+set.
+
+\membersection{wxDbTable::GetCursor}\label{wxdbtablegetcursor}
+
+\func{HSTMT}{GetCursor}{\void}
+
+Returns the HSTMT value of the current cursor for this wxDbTable object.
+
+\wxheading{Remarks}
+
+This function is typically used just before changing to use a different cursor
+so that after the program is finished using the other cursor, the current
+cursor can be set back to being the cursor in use.
+
+\wxheading{See also}
+
+\helpref{wxDbTable::SetCursor}{wxdbtablesetcursor}, \helpref{wxDbTable::GetNewCursor}{wxdbtablegetnewcursor}
+
+\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.
+
+\membersection{wxDbTable::GetFirst}\label{wxdbtablegetfirst}
+
+\func{bool}{GetFirst}{\void}
+
+Retrieves the FIRST row in the record set as defined by the current query.
+Before retrieving records, a query must be performed using
+\helpref{wxDbTable::Query}{wxdbtablequery},
+\helpref{wxDbTable::QueryOnKeyFields}{wxdbtablequeryonkeyfields},
+\helpref{wxDbTable::QueryMatching}{wxdbtablequerymatching} or
+\helpref{wxDbTable::QueryBySqlStmt}{wxdbtablequerybysqlstmt}.
+
+\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::IsFwdOnlyCursors}{wxdbisfwdonlycursors}
+
+\membersection{wxDbTable::GetFromClause}\label{wxdbtablegetfromclause}
+
+\func{const wxString \&}{GetFromClause}{}
+
+Accessor function that returns the current FROM setting assigned with the
+\helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause}.
+
+\wxheading{See also}
+
+\helpref{wxDbTable::From}{wxdbtablefrom}
+
+\membersection{wxDbTable::GetLast}\label{wxdbtablegetlast}
+
+\func{bool}{GetLast}{\void}
+
+Retrieves the LAST row in the record set as defined by the current query.
+Before retrieving records, a query must be performed using
+\helpref{wxDbTable::Query}{wxdbtablequery},
+\helpref{wxDbTable::QueryOnKeyFields}{wxdbtablequeryonkeyfields},
+\helpref{wxDbTable::QueryMatching}{wxdbtablequerymatching} or
+\helpref{wxDbTable::QueryBySqlStmt}{wxdbtablequerybysqlstmt}.
+
+\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::IsFwdOnlyCursors}{wxdbisfwdonlycursors}
+
+\membersection{wxDbTable::GetNewCursor}\label{wxdbtablegetnewcursor}
+
+\func{HSTMT *}{GetNewCursor}{\param{bool }{setCursor=false},
+\param{bool }{bindColumns=true}}
+
+This function will create a new cursor that can be used to access the table
+being referenced by this wxDbTable instance, or to execute direct SQL commands
+on without affecting the cursors that are already defined and possibly
+positioned.
+
+\wxheading{Parameters}
+
+\docparam{setCursor}{{\it OPTIONAL}. Should this new cursor be set to be the
+current cursor after successfully creating the new cursor. Default is false.}
+\docparam{bindColumns}{{\it OPTIONAL}. Should this new cursor be bound to all
+the memory variables that the default cursor is bound to. Default is true.}
+
+\wxheading{Remarks}
+
+This new cursor must be closed using
+\helpref{wxDbTable::DeleteCursor}{wxdbtabledeletecursor}
+by the calling program before the wxDbTable instance is deleted, or both
+memory and resource leaks will occur.
+
+\membersection{wxDbTable::GetNext}\label{wxdbtablegetnext}
+
+\func{bool}{GetNext}{\void}
+
+Retrieves the NEXT row in the record set after the current cursor position
+as defined by the current query. Before retrieving records, a query must be
+performed using \helpref{wxDbTable::Query}{wxdbtablequery},
+\helpref{wxDbTable::QueryOnKeyFields}{wxdbtablequeryonkeyfields},
+\helpref{wxDbTable::QueryMatching}{wxdbtablequerymatching} or
+\helpref{wxDbTable::QueryBySqlStmt}{wxdbtablequerybysqlstmt}.
+
+\wxheading{Return value}
+
+This function returns false when the current cursor has reached the end of
+the result set. When false is returned, data in the bound columns is
+undefined.
+
+\wxheading{Remarks}
+
+This function works with both forward and backward scrolling cursors.
+
+\wxheading{See also}
+\helpref{wxDbTable::++}{wxdbtableplusplus}
+
+\membersection{wxDbTable::GetNumberOfColumns}\label{wxdbtablegetnumberofcolumns}
+
+\func{UWORD }{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 wxString \&}{GetOrderByClause}{}
+
+Accessor function that returns the current ORDER BY setting assigned with
+the \helpref{wxDbTable::SetOrderByClause}{wxdbtablesetorderbyclause}.
+
+\wxheading{See also}
+
+\helpref{wxDbTable::OrderBy}{wxdbtableorderby}
+
+\membersection{wxDbTable::GetPrev}\label{wxdbtablegetprev}
+
+\func{bool}{GetPrev}{\void}
+
+Retrieves the PREVIOUS row in the record set before the current cursor
+position as defined by the current query. Before retrieving records, a
+query must be performed using \helpref{wxDbTable::Query}{wxdbtablequery},
+\helpref{wxDbTable::QueryOnKeyFields}{wxdbtablequeryonkeyfields},
+\helpref{wxDbTable::QueryMatching}{wxdbtablequerymatching} or
+\helpref{wxDbTable::QueryBySqlStmt}{wxdbtablequerybysqlstmt}.
+
+\wxheading{Return value}
+
+This function returns false when the current cursor has reached the beginning
+of the result set and there are now other rows prior to the cursors current
+position. When false is returned, data in the bound columns is undefined.
+
+\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::IsFwdOnlyCursors}{wxdbisfwdonlycursors},
+\helpref{wxDbTable::--}{wxdbtableminusminus}
+
+\membersection{wxDbTable::GetQueryTableName}\label{wxdbtablegetquerytablename}
+
+\func{const wxString \&}{GetQueryTableName}{}
+
+Accessor function that returns the name of the table/view that was indicated
+as being the table/view to query against when this wxDbTable instance was
+created.
+
+\wxheading{See also}
+
+\helpref{wxDbTable constructor}{wxdbtableconstr}
+
+\membersection{wxDbTable::GetRowNum}\label{wxdbtablegetrownum}
+
+\func{UWORD}{GetRowNum}{\void}
+
+Returns the ODBC row number for performing positioned updates and deletes.
+
+\wxheading{Remarks}
+
+This function is not being used within the ODBC class library and may be a
+candidate for removal if no use is found for it.
+
+Row number with some datasources/ODBC drivers is the position in the result set,
+while in others it may be a physical position in the database. Check your
+database documentation to find out which behavior is supported.
+
+\membersection{wxDbTable::GetTableName}\label{wxdbtablegettablename}
+
+\func{const wxString \&}{GetTableName}{}
+
+Accessor function that returns the name of the table that was indicated
+as being the table that this wxDbTable instance was associated with.
+
+\membersection{wxDbTable::GetTablePath}\label{wxdbtablegettablepath}
+
+\func{const wxString \&}{GetTablePath}{}
+
+Accessor function that returns the path to the data table that was indicated
+during creation of this wxDbTable instance.
+
+\wxheading{Remarks}
+
+Currently only applicable to dBase and MS-Access datasources.
+
+\membersection{wxDbTable::GetWhereClause}\label{wxdbtablegetwhereclause}
+
+\func{const wxString \&}{GetWhereClause}{}
+
+Accessor function that returns the current WHERE setting assigned with the
+\helpref{wxDbTable::SetWhereClause}{wxdbtablesetwhereclause}
+
+\wxheading{See also}
+
+\helpref{wxDbTable::Where}{wxdbtablewhere}
+
+\membersection{wxDbTable::Insert}\label{wxdbtableinsert}
+
+\func{int }{Insert}{\void}
+
+Inserts a new record into the table being referenced by this wxDbTable
+instance. The values in the member variables of the wxDbTable instance are
+inserted into the columns of the new row in the database.
+
+\wxheading{Return value}
+
+\begin{verbatim}
+ DB_SUCCESS Record inserted successfully (value = 1)
+
+ DB_FAILURE Insert failed (value = 0)
+
+ DB_ERR_INTEGRITY_CONSTRAINT_VIOL
+ The insert failed due to an integrity
+ constraint violation (duplicate non-unique
+ index entry) is attempted.
+\end{verbatim}
+
+\wxheading{Remarks}
+
+A \helpref{wxDb::CommitTrans}{wxdbcommittrans} or
+\helpref{wxDb::RollbackTrans}{wxdbrollbacktrans} must be called after use of
+this function to commit or rollback the insertion.
+
+\wxheading{Example}
+
+\begin{verbatim}
+ // Incomplete code snippet
+ wxStrcpy(parts->PartName, "10");
+ wxStrcpy(parts->PartDesc, "Part #10");
+ parts->Qty = 1000;
+ RETCODE retcode = parts->Insert();
+ switch(retcode)
+ {
+ case DB_SUCCESS:
+ parts->GetDb()->CommitTrans();
+ return(true);
+ case DB_ERR_INTEGRITY_CONSTRAINT_VIOL:
+ // Current data would result in a duplicate key
+ // on one or more indexes that do not allow duplicates
+ parts->GetDb()->RollbackTrans();
+ return(false);
+ default:
+ // Insert failed for some unexpected reason
+ parts->GetDb()->RollbackTrans();
+ return(false);
+ }
+\end{verbatim}
+
+\membersection{wxDbTable::IsColNull}\label{wxdbtableiscolnull}
+
+\func{bool }{IsColNull}{\param{UWORD }{colNumber}} const
+
+Used primarily in the ODBC class library to determine if a column value is
+set to "NULL". Works for all data types supported by the ODBC class library.
+
+\wxheading{Parameters}
+
+\docparam{colNumber}{The column number of the bound column as defined by the
+\helpref{wxDbTable::SetColDefs}{wxdbtablesetcoldefs}
+calls which defined the columns accessible to this wxDbTable instance.}
+
+\wxheading{Remarks}
+
+NULL column support is currently not fully implemented as of wxWidgets 2.4.
+
+\membersection{wxDbTable::IsCursorClosedOnCommit}\label{wxdbtableiscursorclosedoncommit}
+
+\func{bool }{IsCursorClosedOnCommit}{\void}
+
+Accessor function to return information collected during the opening of the
+datasource connection that is used by this wxDbTable instance. The result
+returned by this function indicates whether an implicit closing of the cursor is
+done after a commit on the database connection.
+
+\wxheading{Return value}
+
+Returns true if the cursor associated with this wxDbTable object is closed
+after a commit or rollback operation. Returns false otherwise.
+
+\wxheading{Remarks}
+
+If more than one wxDbTable instance used the same database connection, all cursors
+which use the database connection are closed on the commit if this function
+indicates true.
+
+\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}{\param{bool }{checkPrivileges=false}, \param{bool }{checkTableExists=true}}
+
+Every wxDbTable instance must be opened before it can be used. This function
+checks for the existence of the requested table, binds columns, creates required
+cursors, (insert/select and update if connection is not wxDB\_QUERY\_ONLY) and
+constructs the insert statement that is to be used for inserting data as a new
+row in the datasource.
+
+NOTE: To retrieve data into an opened table, the of the table must be bound
+to the variables in the program via call(s) to
+\helpref{wxDbTable::SetColDefs}{wxdbtablesetcoldefs} before calling Open().
+
+See the \helpref{database classes overview}{odbcoverview} for
+an introduction to using the ODBC classes.
+
+\wxheading{Parameters}
+
+\docparam{checkPrivileges}{Indicates whether the Open() function should check
+whether the current connected user has at least SELECT privileges to access the
+table to which they are trying to open. Default is false.}
+
+\docparam{checkTableExists}{Indicates whether the Open() function should check
+whether the table exists in the database or not before opening it. Default is true.}
+
+\wxheading{Remarks}
+
+If the function returns a false value due to the table not existing, a log
+entry is recorded for the datasource connection indicating the problem
+that was detected when checking for table existence. Note that it is usually
+best for the calling routine to check for the existence of the table and for
+sufficient user privileges to access the table in the mode (wxDB\_QUERY\_ONLY or
+!wxDB\_QUERY\_ONLY) before trying to open the table for the best possible
+explanation as to why a table cannot be opened.
+
+Checking the user's privileges on a table can be quite time consuming during
+the open phase. With most applications, the programmer already knows that the
+user has sufficient privileges to access the table, so this check is normally
+not required.
+
+For best performance, open the table, and then use the
+\helpref{wxDb::TablePrivileges}{wxdbtableprivileges} function
+to check the users privileges. Passing a schema to the TablePrivileges()
+function can significantly speed up the privileges checks.
+
+\wxheading{See also}
+
+\helpref{wxDb::TableExists}{wxdbtableexists},
+\helpref{wxDb::TablePrivileges}{wxdbtableprivileges}
+\helpref{wxDbTable::SetColDefs}{wxdbtablesetcoldefs}
+
+\membersection{wxDbTable::OrderBy}\label{wxdbtableorderby}
+
+\func{const wxString \&}{OrderBy}{}
+
+\func{void}{OrderBy}{\param{const wxString \&}{OrderBy}}
+
+Accessor function for the private class member wxDbTable::orderBy. Can be
+used as a synonym for
+\helpref{wxDbTable::GetOrderByClause}{wxdbtablegetorderbyclause}
+(the first form of this function) or
+\helpref{wxDbTable::SetOrderByClause}{wxdbtablesetorderbyclause}
+(the second form of this function).
+
+\wxheading{Parameters}
+
+\docparam{OrderBy}{A comma separated list of column names that indicate the
+alphabetized/numeric sorting sequence that the result set is to be returned
+in. If a FROM clause has also been specified, each column name specified in
+the ORDER BY clause should be prefaced with the table name to which the column
+belongs using DOT notation (TABLE\_NAME.COLUMN\_NAME).}
+
+\wxheading{Return value}
+
+The first form of this function returns the current value of the wxDbTable
+member variable ::orderBy.
+
+The second form of the function has no return value.
+
+\wxheading{See also}
+
+\helpref{wxDbTable::GetOrderByClause}{wxdbtablegetorderbyclause},
+\helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause}
+
+\membersection{wxDbTable::Query}\label{wxdbtablequery}
+
+\func{virtual bool }{Query}{\param{bool }{forUpdate=false}, \param{bool }{distinct=false}}
+
+\wxheading{Parameters}
+
+\docparam{forUpdate}{{\it OPTIONAL}. Gives you the option of locking records
+as they are retrieved. If the RDBMS is not capable of the FOR UPDATE clause,
+this argument is ignored. See
+\helpref{wxDbTable::CanSelectForUpdate}{wxdbtablecanselectforupdate} for
+additional information regarding this argument. Default is false.}
+\docparam{distinct}{{\it OPTIONAL}. Allows selection of only distinct values
+from the query (SELECT DISTINCT ... FROM ...). The notion of DISTINCT
+applies to all columns returned in the result set, not individual columns.
+Default is false.}
+
+\wxheading{Remarks}
+
+This function queries records from the datasource based on the three
+wxDbTable members: "where", "orderBy", and "from". Use
+\helpref{wxDbTable::SetWhereClause}{wxdbtablesetwhereclause} to filter on
+records to be retrieved (e.g. All users with a first name of "JOHN").
+Use \helpref{wxDbTable::SetOrderByClause}{wxdbtablesetorderbyclause} to
+change the sequence in which records are returned in the result set from
+the datasource (e.g. Ordered by LAST\_NAME). Use
+\helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause} to allow inner
+joining of the base table (the one being associated with this instance of
+wxDbTable) with other tables which share a related field.
+
+After each of these clauses are set/cleared, call wxDbTable::Query() to
+fetch the result set from the datasource.
+
+This scheme has an advantage if you have to requery your record set
+frequently in that you only have to set your WHERE, ORDER BY, and FROM
+clauses once. Then to refresh the record set, simply call wxDbTable::Query()
+as frequently as needed.
+
+Note that repeated calls to wxDbTable::Query() may tax the database
+server and make your application sluggish if done too frequently or
+unnecessarily.
+
+The base table name is automatically prepended to the base column names in
+the event that the FROM clause has been set (is non-null) using
+\helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause}.
+
+The cursor for the result set is positioned {\it before} the first record in
+the result set after the query. To retrieve the first record, call either
+\helpref{wxDbTable::GetFirst}{wxdbtablegetfirst} (only if backward scrolling
+cursors are available) or
+\helpref{wxDbTable::GetNext}{wxdbtablegetnext}. Typically, no data from the
+result set is returned to the client driver until a request such as
+\helpref{wxDbTable::GetNext}{wxdbtablegetnext} is performed, so network
+traffic and database load are not overwhelmed transmitting data until the
+data is actually requested by the client. This behavior is solely dependent
+on the ODBC driver though, so refer to the ODBC driver's reference material
+for information on its behaviors.
+
+Values in the bound columns' memory variables are undefined after executing a
+call to this function and remain that way until a row in the result set is
+requested to be returned.
+
+The wxDbTable::Query() function is defined as "virtual" so that it may be
+overridden for application specific purposes.
+
+\normalbox{Be sure to set the wxDbTable's "where", "orderBy", and "from"
+member variables to "" if they are not to be used in the query. Otherwise,
+the results returned may have unexpected results (or no results) due to
+improper or incorrect query parameters constructed from the uninitialized
+clauses.}
+
+\wxheading{Example}
+
+\begin{verbatim}
+ // Incomplete code sample
+ parts->SetWhereClause("DESCRIPTION = 'FOOD'");
+ parts->SetOrderByClause("EXPIRATION_DATE");
+ parts->SetFromClause("");
+ // Query the records based on the where, orderBy and from clauses
+ // specified above
+ parts->Query();
+ // Display all records queried
+ while(parts->GetNext())
+ dispPart(parts); // user defined function
+\end{verbatim}
+
+\membersection{wxDbTable::QueryBySqlStmt}\label{wxdbtablequerybysqlstmt}
+
+\func{bool}{QueryBySqlStmt}{\param{const wxString \&}{pSqlStmt}}
+
+Performs a query against the datasource by accepting and passing verbatim the
+SQL SELECT statement passed to the function.
+
+\wxheading{Parameters}
+
+\docparam{pSqlStmt}{Pointer to the SQL SELECT statement to be executed.}
+
+\wxheading{Remarks}
+
+This is the most powerful form of the query functions available. This member
+function allows a programmer to write their own custom SQL SELECT statement
+for requesting data from the datasource. This gives the programmer access
+to the full power of SQL for performing operations such as scalar functions,
+aggregate functions, table joins, and sub-queries, as well as datasource
+specific function calls.
+
+The requirements of the SELECT statement are the following:
+
+\begin{enumerate}
+\item Must return the correct number of columns. In the derived
+wxDbTable constructor, it is specified how many columns are in
+the wxDbTable object. The SELECT statement must return exactly
+that many columns.
+\item The columns must be returned in the same sequence as specified
+when defining the bounds columns \helpref{wxDbTable::SetColDefs}{wxdbtablesetcoldefs},
+and the columns returned must be of the proper data type. For
+example, if column 3 is defined in the wxDbTable bound column
+definitions to be a float, the SELECT statement must return a
+float for column 3 (e.g. PRICE * 1.10 to increase the price by
+10%).
+\item The ROWID can be included in your SELECT statement as the {\bf last}
+column selected, if the datasource supports it. Use
+wxDbTable::CanUpdateByROWID() to determine if the ROWID can be
+selected from the datasource. If it can, much better
+performance can be achieved on updates and deletes by including
+the ROWID in the SELECT statement.
+\end{enumerate}
+
+Even though data can be selected from multiple tables (joins) in your select
+statement, only the base table associated with this wxDbTable object
+is automatically updated through the ODBC class library. Data from multiple
+tables can be selected for display purposes however. Include columns in
+the wxDbTable object and mark them as non-updateable (See
+\helpref{wxDbColDef}{wxdbcoldef} for details). This way columns can be
+selected and displayed from other tables, but only the base table will be
+updated automatically when performed through the
+\helpref{wxDbTable::Update}{wxdbtableupdate} function after using this type of
+query. To update tables other than the base table, use the
+\helpref{wxDbTable::Update}{wxdbtableupdate} function passing a SQL statement.
+
+After this function has been called, the cursor is positioned before the
+first record in the record set. To retrieve the first record, call
+either \helpref{wxDbTable::GetFirst}{wxdbtablegetfirst} or
+\helpref{wxDbTable::GetNext}{wxdbtablegetnext}.
+
+\wxheading{Example}
+
+\begin{verbatim}
+ // Incomplete code samples
+ wxString sqlStmt;
+ sqlStmt = "SELECT * FROM PARTS WHERE STORAGE_DEVICE = 'SD98' \
+ AND CONTAINER = 12";
+ // Query the records using the SQL SELECT statement above
+ parts->QueryBySqlStmt(sqlStmt);
+ // Display all records queried
+ while(parts->GetNext())
+ dispPart(&parts);
+
+ Example SQL statements
+ ----------------------
+
+ // Table Join returning 3 columns
+ SELECT PART_NUM, part_desc, sd_name
+ from parts, storage_devices
+ where parts.storage_device_id =
+ storage_devices.storage_device_id
+
+ // Aggregate function returning total number of
+ // parts in container 99
+ SELECT count(*) from PARTS where container = 99
+
+ // Order by clause; ROWID, scalar function
+ SELECT PART_NUM, substring(part_desc, 1, 10), qty_on_hand + 1, ROWID
+ from parts
+ where warehouse = 10
+ order by PART_NUM desc // descending order
+
+ // Subquery
+ SELECT * from parts
+ where container in (select container
+ from storage_devices
+ where device_id = 12)
+\end{verbatim}
+
+\membersection{wxDbTable::QueryMatching}\label{wxdbtablequerymatching}
+
+\func{virtual bool }{QueryMatching}{\param{bool }{forUpdate=false},
+\param{bool }{distinct=false}}
+
+QueryMatching allows querying of records from the table associated with
+the wxDbTable object by matching "columns" to values.
+
+For example: To query the datasource for the row with a PART\_NUMBER column
+value of "32", clear all column variables of the wxDbTable object, set the
+PartNumber variable that is bound to the PART\_NUMBER column in the wxDbTable
+object to "32", and then call wxDbTable::QueryMatching().
+
+\wxheading{Parameters}
+
+\docparam{forUpdate}{{\it OPTIONAL}. Gives you the option of locking records
+as they are queried (SELECT ... FOR UPDATE). If the RDBMS is not capable of
+the FOR UPDATE clause, this argument is ignored. See
+\helpref{wxDbTable::CanSelectForUpdate}{wxdbtablecanselectforupdate} for
+additional information regarding this argument. Default is false.}
+\docparam{distinct}{{\it OPTIONAL}. Allows selection of only distinct values
+from the query (SELECT DISTINCT ... FROM ...). The notion of DISTINCT
+applies to all columns returned in the result set, not individual columns.
+Default is false.}
+
+\wxheading{Remarks}
+
+The SQL WHERE clause is built by the ODBC class library based on all
+non-zero/non-NULL columns in your wxDbTable object. Matches can be on one,
+many or all of the wxDbTable's columns. The base table name is prepended
+to the column names in the event that the wxDbTable's FROM clause is non-null.
+
+This function cannot be used to perform queries which will check for
+columns that are 0 or NULL, as the automatically constructed WHERE clause
+only will contain comparisons on column member variables that are
+non-zero/non-NULL.
+
+The primary difference between this function and \helpref{wxDbTable::QueryOnKeyFields}{wxdbtablequeryonkeyfields}
+is that this function can query on any column(s) in the wxDbTable object.
+Note however that this may not always be very efficient. Searching on
+non-indexed columns will always require a full table scan.
+
+The cursor is positioned before the first record in the record set after
+the query is performed. To retrieve the first record, the program must call
+either \helpref{wxDbTable::GetFirst}{wxdbtablegetfirst} or
+\helpref{wxDbTable::GetNext}{wxdbtablegetnext}.
+
+WHERE and FROM clauses specified using \helpref{wxDbTable::SetWhereClause}{wxdbtablesetwhereclause}
+and \helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause} are ignored by
+this function.
+
+\wxheading{Example}
+
+\begin{verbatim}
+ // Incomplete code sample
+ parts->ClearMemberVars(); // Set all columns to zero
+ wxStrcpy(parts->PartNumber,"32"); // Set columns to query on
+ parts->OnHold = true;
+ parts->QueryMatching(); // Query
+ // Display all records queried
+ while(parts->GetNext())
+ dispPart(parts); // Some application defined function
+\end{verbatim}
+
+\membersection{wxDbTable::QueryOnKeyFields}\label{wxdbtablequeryonkeyfields}
+
+\func{bool }{QueryOnKeyFields}{\param{bool }{forUpdate=false},
+\param{bool }{distinct=false}}
+
+QueryOnKeyFields provides an easy mechanism to query records in the table
+associated with the wxDbTable object by the primary index column(s). Simply
+assign the primary index column(s) values and then call this member function
+to retrieve the record.