datasource, as well as allowing access to any tables/views defined in
the datasource to which the user has sufficient privileges.
+See the \helpref{database classes overview}{odbcoverview} for
+an introduction to using the ODBC classes.
+
\wxheading{Include files}
<wx/db.h>
See the remarks in \helpref{wxDb::Dbms}{wxdbdbms} for exceptions/issues with each of these database engines.
-
\wxheading{Public member variables}
\docparam{SWORD {\bf wxDb::cbErrorMsg}}{This member variable is populated as a result of calling \helpref{wxDb::GetNextError}{wxdbgetnexterror}. Contains the count of bytes in the wxDb::errorMsg string.}
The following functions are used in conjunction with the wxDb class.
-
\func{void}{wxDbCloseConnections}{\void}
\wxheading{Remarks}
Writes a message to the wxLog window (stdout usually) when an internal
error situation occurs. This function only works in DEBUG builds
-
\func{bool}{wxDbSqlLog}{\param{wxDbSqlLogState }{state}, \param{const wxString \&}{filename = SQL\_LOG\_FILENAME}}
\wxheading{Remarks}
This function sets the sql log state for all open wxDb objects
-
\func{bool}{wxDbGetDataSource}{\param{HENV }{henv}, \param{wxChar *}{Dsn}, \param{SWORD }{DsnMax}, \param{wxChar *}{DsDesc}, \param{SWORD }{DsDescMax}, \param{UWORD }{direction = SQL\_FETCH\_NEXT}}
\wxheading{Remarks}
datasources. Repeatedly call this function to obtain all the datasources
available through the ODBC driver manager on the current workstation.
+\begin{verbatim}
wxStringList strList;
while (wxDbGetDataSource(DbConnectInf.GetHenv(), Dsn, SQL\_MAX\_DSN\_LENGTH+1, DsDesc, 255))
strList.Add(Dsn);
-
+\end{verbatim}
\latexignore{\rtfignore{\wxheading{Members}}}
\wxheading{See also}
-\helpref{wxDbGetConnection}{wxdbfunctions},
-
+\helpref{wxDbGetConnection}{wxdbfunctions}
\membersection{wxDb::Catalog}\label{wxdbcatalog}
return(db.DispAllErrors(db.henv, db.hdbc, hstmt));
\end{verbatim}
-
\membersection{wxDb::DispNextError}\label{wxdbdispnexterror}
\func{void}{DispNextError}{\void}
\membersection{wxDb::ExecSql}\label{wxdbexecsql}
-
\func{bool}{ExecSql}{\param{const wxString \&}{pSqlStmt}}
Allows a native SQL command to be executed directly against the datasource. In addition to being able to run any standard SQL command, use of this function allows a user to (potentially) utilize features specific to the datasource they are connected to that may not be available through ODBC. The ODBC driver will pass the specified command directly to the datasource.
\helpref{wxDb::GetData}{wxdbgetdata}, \helpref{wxDb::GetNext}{wxdbgetnext}
-
\membersection{wxDb::FwdOnlyCursors}\label{wxdbfwdonlycursors}
\func{bool}{IsFwdOnlyCursors}{\void}
}
\end{verbatim}
-
\membersection{wxDb::GetData}\label{wxdbgetdata}
\func{bool}{GetData}{\param{UWORD}{ colNo}, \param{SWORD}{ cType},
db.Grant(DB_GRANT_SELECT | DB_GRANT_INSERT, "PARTS", "mary, sue");
\end{verbatim}
-
\membersection{wxDb::IsFwdOnlyCursors}\label{wxdbisfwdonlycursors}
\func{bool}{IsFwdOnlyCursors}{\void}
\helpref{wxDb constructor}{wxdbconstr}, \helpref{wxDbGetConnection}{wxdbfunctions}
-
\membersection{wxDb::IsOpen}\label{wxdbisopen}
\func{bool}{IsOpen}{\void}
successful or not. See \helpref{wxDb::Open}{wxdbopen} for more details on
partial failures to open a connection instance.
-
\membersection{wxDb::LogError}\label{wxdblogerror}
\func{void}{LogError}{\param{const wxString \&}{errMsg} \param{const wxString \&}{SQLState=""}}
\helpref{wxDb::WriteSqlLog}{wxdbwritesqllog}
-
\membersection{wxDb::ModifyColumn}\label{wxdbmodifycolumn}
\func{void}{ModifyColumn}{\param{const wxString \&}{tableName} \param{const wxString \&}{ColumnName}
}
\end{verbatim}
-
\membersection{wxDb::RollbackTrans}\label{wxdbrollbacktrans}
\func{bool}{RollbackTrans}{\void}
\helpref{wxDb::CommitTrans}{wxdbcommittrans} for a special note on cursors
-
\membersection{wxDb::SetDebugErrorMessages}\label{wxdbsetdebugerrormessages}
\func{void}{SetDebugErrorMessages}{\param{bool }{state}}
\helpref{wxDb constructor}{wxdbconstr}
-
\membersection{wxDb::SetSqlLogging}\label{wxdbsetsqllogging}
\func{bool}{SetSqlLogging}{\param{wxDbSqlLogState}{ state}, \param{const wxString \&}{filename = SQL\_LOG\_FILENAME}, \param{bool }{ append = FALSE}}
When called with {\it sqlLogOFF}, the logging file is closed, and any calls to \helpref{wxDb::WriteSqlLog}{wxdbwritesqllog} are ignored.
-
\membersection{wxDb::SQLColumnName}\label{wxdbsqlcolumnname}
\func{const wxString}{SQLColumnName}{\param{const char *}{ colName}}
\helpref{wxDb::SQLTableName}{wxdbsqltablename}
-
\membersection{wxDb::SQLTableName}\label{wxdbsqltablename}
\func{const wxString}{SQLTableName}{\param{const char *}{ tableName}}
\helpref{wxDb::SQLColumnName}{wxdbsqlcolumnname}
-
\membersection{wxDb::TableExists}\label{wxdbtableexists}
\func{bool}{TableExists}{\param{const wxString \&}{tableName}, \param{const wxChar *}{userID=NULL}, \param{const wxString \&}{path=""}}
\helpref{wxDb::TablePrivileges}{wxdbtableprivileges}
-
\membersection{wxDb::TablePrivileges}\label{wxdbtableprivileges}
\func{bool}{TablePrivileges}{\param{const wxString \&}{tableName}, \param{const wxString \&}{priv},
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}}
\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
\wxheading{See also}
+\helpref{database classes overview}{odbcoverview},
\helpref{wxDbTable::GetColDefs}{wxdbtablegetcoldefs}, \helpref{wxDb constructor}{wxdbconstr}
-
\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
The destructor does nothing at this time.
-Only one function is provided with this class currently:
+Only one function is provided with this class currently.
+See the \helpref{database classes overview}{odbcoverview} for
+an introduction to using the ODBC classes.
\membersection{wxDbColFor::Format}\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.
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.
\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
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::wxDbConnectInfo}
+
\func{}{wxDbConnectInf}{\void}
Default constructor.
Constructor which allows initial settings of all the classes member variables.
-See the special not below on the henv parameter for forcing this constructor
+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.
\helpref{wxDConnectInf::AllocHenv}{wxdbconnectinfallochenv},
\helpref{wxDConnectInf::FreeHenv}{wxdbconnectinffreehenv}
-
\membersection{wxDbConnectInf::\destruct{wxDbConnectInf}}\label{wxdbconnectinfdestr}
\func{}{\destruct{wxDbConnectInf}}{}
\helpref{wxDConnectInf::FreeHenv}{wxdbconnectinffreehenv} to free the
SQL environment handle.
-
\membersection{wxDbConnectInf::AllocHenv}\label{wxdbconnectinfallochenv}
\func{bool }{AllocHenv}{\void}
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}
\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}
Synonymous with \helpref{wxDbConnectInf::GetPassword}{wxdbconnectinfgetpassword}
-
\membersection{wxDbConnectInf::GetDefaultDir}\label{wxdbconnectinfgetdefaultdir}
\func{const wxChar *}{GetDefaultDir}{\void}
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}
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}
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}
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}
Synonymous with \helpref{wxDbConnectInf::SetPassword}{wxdbconnectinfsetpassword}
-
\membersection{wxDbConnectInf::SetDefaultDir}\label{wxdbconnectinfsetdefaultdir}
\func{\void}{SetDefaultDir}{const wxString \&defDir}
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}
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 \&}
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}
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
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.
\section{\class{wxDbInf}}\label{wxdbinf}
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.
+
\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>\\
Virtual default destructor.
-
\membersection{wxDbTable::BuildDeleteStmt}\label{wxdbtablebuilddeletestmt}
\func{void}{BuildDeleteStmt}{\param{wxString \&}{pSqlStmt},
and \helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause} are ignored by
this function.
-
\membersection{wxDbTable::BuildSelectStmt}\label{wxdbtablebuildselectstmt}
\func{void}{BuildSelectStmt}{\param{wxString \&}{pSqlStmt},
and \helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause} are ignored by
this function.
-
\membersection{wxDbTable::BuildUpdateStmt}\label{wxdbtablebuildupdatestmt}
\func{void}{BuildUpdateStmt}{\param{wxString \&}{pSqlStmt}, \param{int }{typeOfUpd},
and \helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause} are ignored by
this function.
-
\membersection{wxDbTable::BuildWhereStmt}\label{wxdbtablebuildwherestmt}
\func{void}{BuildSelectStmt}{\param{wxString \&}{pWhereClause},
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}
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}
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}}
3) Call wxDbTable::QueryMatching() or wxDbTable::DeleteMatching()
\end{verbatim}
-
\membersection{wxDbTable::CloseCursor}\label{wxdbtableclosecursor}
\func{bool}{CloseCursor}{\param{HSTMT}{cursor}}
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="*"}}
totalNumberOfUniqueFirstNames = users.Count("DISTINCT FIRST_NAME");
\end{verbatim}
-
\membersection{wxDbTable::CreateIndex}\label{wxdbtablecreateindex}
\func{bool}{CreateIndex}{\param{const wxString \&}{idxName}, \param{bool }{unique},
parts->CreateIndex(indexName, TRUE, 2, idxDef);
\end{verbatim}
-
\membersection{wxDbTable::CreateTable}\label{wxdbtablecreatetable}
\func{bool}{CreateTable}{\param{bool }{attemptDrop=TRUE}}
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}
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}}
\normalbox{DO NOT DELETE THE wxDB\_DEFAULT\_CURSOR!}
-
\membersection{wxDbTable::DeleteMatching}\label{wxdbtabledeletematching}
\func{bool}{DeleteMatching}{\void}
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}
It is not necessary to call \helpref{wxDb::CommitTrans}{wxdbcommittrans}
after executing this function.
-
\membersection{wxDbTable::DropTable}\label{wxdbtabledroptable}
\func{bool}{DropTable}{\void}
It is not necessary to call \helpref{wxDb::CommitTrans}{wxdbcommittrans}
after executing this function.
-
\membersection{wxDbTable::From}\label{wxdbtablefrom}
\func{const wxString \&}{From}{}
These column definitions must not be manually redefined after they have been
set.
-
\membersection{wxDbTable::GetCursor}\label{wxdbtablegetcursor}
\func{HSTMT}{GetCursor}{\void}
\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}
\helpref{wxDb::IsFwdOnlyCursors}{wxdbisfwdonlycursors}
-
\membersection{wxDbTable::GetFromClause}\label{wxdbtablegetfromclause}
\func{const wxString \&}{GetFromClause}{}
\helpref{wxDbTable::From}{wxdbtablefrom}
-
\membersection{wxDbTable::GetLast}\label{wxdbtablegetlast}
\func{bool}{GetLast}{\void}
\helpref{wxDb::IsFwdOnlyCursors}{wxdbisfwdonlycursors}
-
\membersection{wxDbTable::GetNewCursor}\label{wxdbtablegetnewcursor}
\func{HSTMT *}{GetNewCursor}{\param{bool }{setCursor=FALSE},
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}
\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}{}
\helpref{wxDbTable::OrderBy}{wxdbtableorderby}
-
\membersection{wxDbTable::GetPrev}\label{wxdbtablegetprev}
\func{bool}{GetPrev}{\void}
\helpref{wxDb::IsFwdOnlyCursors}{wxdbisfwdonlycursors},
\helpref{wxDbTable::--}{wxdbtableminusminus}
-
\membersection{wxDbTable::GetQueryTableName}\label{wxdbtablegetquerytablename}
\func{const wxString \&}{GetQueryTableName}{}
\helpref{wxDbTable constructor}{wxdbtableconstr}
-
\membersection{wxDbTable::GetRowNum}\label{wxdbtablegetrownum}
\func{UWORD}{GetRowNum}{\void}
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}{}
Currently only applicable to dBase and MS-Access datasources.
-
\membersection{wxDbTable::GetWhereClause}\label{wxdbtablegetwhereclause}
\func{const wxString \&}{GetWhereClause}{}
\helpref{wxDbTable::Where}{wxdbtablewhere}
-
\membersection{wxDbTable::Insert}\label{wxdbtableinsert}
\func{int }{Insert}{\void}
}
\end{verbatim}
-
\membersection{wxDbTable::IsColNull}\label{wxdbtableiscolnull}
\func{bool }{IsColNull}{\param{UWORD }{colNo}} const
\wxheading{Remarks}
-NULL column support is currently not fully implemented as of wxWindows 2.4
-
+NULL column support is currently not fully implemented as of wxWindows 2.4.
\membersection{wxDbTable::IsCursorClosedOnCommit}\label{wxdbtableiscursorclosedoncommit}
which use the database connection are closed on the commit if this function
indicates TRUE.
-
\membersection{wxDbTable::IsQueryOnly}\label{wxdbtableisqueryonly}
\func{bool }{IsQueryOnly}{}
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}}
\helpref{wxDb::TableExists}{wxdbtableexists},
\helpref{wxDb::TablePrivileges}{wxdbtableprivileges}
-
\membersection{wxDbTable::OrderBy}\label{wxdbtableorderby}
\func{const wxString \&}{OrderBy}{}
\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}}
dispPart(parts); // user defined function
\end{verbatim}
-
\membersection{wxDbTable::QueryBySqlStmt}\label{wxdbtablequerybysqlstmt}
\func{bool}{QueryBySqlStmt}{\param{const wxString \&}{pSqlStmt}}
where device_id = 12)
\end{verbatim}
-
\membersection{wxDbTable::QueryMatching}\label{wxdbtablequerymatching}
\func{virtual bool }{QueryMatching}{\param{bool }{forUpdate=FALSE},
dispPart(parts); // Some application defined function
\end{verbatim}
-
\membersection{wxDbTable::QueryOnKeyFields}\label{wxdbtablequeryonkeyfields}
\func{bool }{QueryOnKeyFields}{\param{bool }{forUpdate=FALSE},
dispPart(parts); // Some application defined function
\end{verbatim}
-
\membersection{wxDbTable::Refresh}\label{wxdbtablerefresh}
\func{bool}{Refresh}{\void}
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},
SQL_C_CHAR, PART_NUMBER_LEN, TRUE, FALSE,TRUE,FALSE);
\end{verbatim}
-
\membersection{wxDbTable::SetCursor}\label{wxdbtablesetcursor}
\func{bool}{SetCursor}{\param{HSTMT *}{hstmtActivate = (void **) wxDB\_DEFAULT\_CURSOR}}
\helpref{wxDbTable::GetCursor}{wxdbtablegetcursor},
\helpref{wxDbTable::SetCursor}{wxdbtablesetcursor}
-
\membersection{wxDbTable::SetFromClause}\label{wxdbtablesetfromclause}
\func{void}{SetFromClause}{\param{const wxString \&}{From}}
\helpref{wxDbTable::From}{wxdbtablefrom},
\helpref{wxDbTable::GetFromClause}{wxdbtablegetfromclause}
-
\membersection{wxDbTable::SetColNull}\label{wxdbtablesetcolnull}
\func{bool}{SetColNull}{\param{UWORD }{colNo}, \param{bool }{set=TRUE}}
the column to NULL, passing FALSE sets the column to be non-NULL. Default is
TRUE.}
-
\wxheading{Remarks}
No database updates are done by this function. It only operates on the
member variables in memory. Use and insert or update function to store this
value to disk.
-
\membersection{wxDbTable::SetOrderByClause}\label{wxdbtablesetorderbyclause}
\func{void}{SetOrderByClause}{\param{const wxString \&}{OrderBy}}
\helpref{wxDbTable::OrderBy}{wxdbtableorderby},
\helpref{wxDbTable::GetOrderByClause}{wxdbtablegetorderbyclause}
-
\membersection{wxDbTable::SetQueryTimeout}\label{wxdbtablesetquerytimeout}
\func{bool}{SetQueryTimeout}{\param{UDWORD }{nSeconds}}
should be evaluated for support before depending on this function working
correctly.
-
\membersection{wxDbTable::SetWhereClause}\label{wxdbtablesetwhereclause}
\func{void}{SetWhereClause}{\param{const wxString \&}{Where}}
\helpref{wxDbTable::Where}{wxdbtablewhere},
\helpref{wxDbTable::GetWhereClause}{wxdbtablegetwhereclause}
-
\membersection{wxDbTable::Update}\label{wxdbtableupdate}
\func{bool }{Update}{\void}
sqlStmt = "update PART set QTY = 0 where PART_NUMBER = '32'";
\end{verbatim}
-
\membersection{wxDbTable::UpdateWhere}\label{wxdbtableupdatewhere}
\func{bool}{UpdateWhere}{\param{const wxString \&}{pWhereClause}}
\helpref{wxDb::RollbackTrans}{wxdbrollbacktrans} must be called after use of
this function to commit or rollback the update(s).
-
\membersection{wxDbTable::Where}\label{wxdbtablewhere}
\func{const wxString \&}{Where}{}
\helpref{wxDbTable::GetWhereClause}{wxdbtablegetwhereclause},
\helpref{wxDbTable::SetWhereClause}{wxdbtablesetwhereclause}
-
-
\membersection{wxDbTable::operator $++$}\label{wxdbtableplusplus}
\func{bool}{operator $++$}{\void}
\helpref{wxDbTable::GetNext}{wxdbtablegetnext}
-
\membersection{wxDbTable::operator $--$}\label{wxdbtableminusminus}
\func{bool}{operator $--$}{\void}
\helpref{wxDbTable::GetPrev}{wxdbtablegetprev}
-
\section{\class{wxDbTableInf}}\label{wxdbtableinf}
\begin{verbatim}
pColInf = NULL;
\end{verbatim}
-
Currently only used by \helpref{wxDb::GetCatalog}{wxdbgetcatalog} internally
and \helpref{wxDbInf}{wxdbinf} class, but may be used in future releases for
user functions. Contains information describing the table (Name, type, etc).
Eventually, accessor functions will be added for this class
+See the \helpref{database classes overview}{odbcoverview} for
+an introduction to using the ODBC classes.
+
\membersection{wxDbTableInf::Initialize}\label{wxdbtableinfinitialize}
Simply initializes all member variables to a cleared state. Called by