+\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 \&}{idxName}}
+
+Allows an index on the associated table to be dropped (deleted) if the user
+login has sufficient privileges to do so.
+
+\wxheading{Parameters}
+
+\docparam{idxName}{Name of the index to be dropped.}
+
+\wxheading{Remarks}
+
+If the index specified in the 'idxName' 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 outer
+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 }{colNo}} 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{colNo}{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 wxWindows 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.
+
+\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}
+
+\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 outer
+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 using wxDbTable::SetColDefs(),
+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::CanUpdByROWID() 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_no, 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_no, substring(part_desc, 1, 10), qty_on_hand + 1, ROWID
+ from parts
+ where warehouse = 10
+ order by part_no 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.
+
+Note that since primary indexes are always unique, this function implicitly
+always returns a single record from the database. The base table name is
+prepended to the column names in the event that the wxDbTable's FROM clause
+is non-null.
+
+\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 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
+ wxStrcpy(parts->PartNumber, "32");
+ parts->QueryOnKeyFields();
+ // Display all records queried
+ while(parts->GetNext())
+ dispPart(parts); // Some application defined function
+\end{verbatim}
+
+\membersection{wxDbTable::Refresh}\label{wxdbtablerefresh}
+
+\func{bool}{Refresh}{\void}
+
+This function re-reads the bound columns into the memory variables, setting
+them to the current values stored on the disk.
+
+The cursor position and result set are unaffected by calls to this function.
+(The one exception is in the case where the record to be refreshed has been
+deleted by some other user or transaction since it was originally retrieved
+as part of the result set. For most datasources, the default behavior in
+this situation is to return the value that was originally queried for the
+result set, even though it has been deleted from the database. But this is
+datasource dependent, and should be tested before relying on this behavior.)
+
+\wxheading{Remarks}
+
+This routine is only guaranteed to work if the table has a unique primary
+index defined for it. Otherwise, more than one record may be fetched and
+there is no guarantee that the correct record will be refreshed. The
+table's columns are refreshed to reflect the current data in the database.
+
+\membersection{wxDbTable::SetColDefs}\label{wxdbtablesetcoldefs}
+
+\func{void}{SetColDefs}{\param{UWORD }{index}, \param{const wxString \&}{fieldName},
+\param{int }{dataType}, \param{void *}{pData}, \param{SWORD }{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{UWORD }{numCols}}