The following functions are used in conjunction with the wxDb class.
+\func{void}{wxDbCloseConnections}{\void}
+
+\wxheading{Remarks}
+
+Closes all cached connections that have been made through use of the
+\helpref{wxDbGetConnection}{wxdbfunctions} function.
+
+NOTE: These connections are closed regardless of whether they are in use
+or not. This function should only be called after the program has
+finished using the connections and all wxDbTable instances that use any of
+the connections have been closed.
+
+This function performs a \helpref{wxDb::CommitTrans}{wxdbcommittrans}
+on the connection before closing it to commit any changes that are still
+pending, as well as to avoid any function sequence errors upon closing
+each connection.
+
+
+\func{int }{wxDbConnectionsInUse}{\void}
+
+\wxheading{Remarks}
+
+Returns a count of how many database connections are currently free ( not
+being used) that have been cached through use of the \helpref{wxDbGetConnection}{wxdbfunctions}
+function.
+
+
+\func{bool}{wxDbFreeConnection}{\param{wxDb *}{pDb}}
+
+\wxheading{Remarks}
+
+Searches the list of cached database connections connection for one matching
+the passed in wxDb instance. If found, that cached connection is freed.
+
+Freeing a connection means that it is marked as available (free) in the
+cache of connections, so that a call to \helpref{wxDbGetConnection}{wxdbfunctions}
+is able to return a pointer to the wxDb instance for use. Freeing a
+connection does NOT close the connection, it only makes the connection
+available again.
+
+
\func{wxDb *}{wxDbGetConnection}{\param{wxDbConnectInf *}{pDbConfig},
\param{bool }{FwdOnlyCursors=(bool)wxODBC\_FWD\_ONLY\_CURSORS}}
cached connections created by calls to wxDbGetConnection().
-\func{bool}{wxDbFreeConnection}{\param{wxDb *}{pDb}}
-
-\wxheading{Remarks}
-
-Searches the list of cached database connections connection for one matching
-the passed in wxDb instance. If found, that cached connection is freed.
-
-Freeing a connection means that it is marked as available (free) in the
-cache of connections, so that a call to \helpref{wxDbGetConnection}{wxdbfunctions}
-is able to return a pointer to the wxDb instance for use. Freeing a
-connection does NOT close the connection, it only makes the connection
-available again.
-
-
-\func{void}{wxDbCloseConnections}{\void}
-
-\wxheading{Remarks}
-
-Closes all cached connections that have been made through use of the
-\helpref{wxDbGetConnection}{wxdbfunctions} function.
-
-NOTE: These connections are closed regardless of whether they are in use
-or not. This function should only be called after the program has
-finished using the connections and all wxDbTable instances that use any of
-the connections have been closed.
-
-This function performs a \helpref{wxDb::CommitTrans}{wxdbcommittrans}
-on the connection before closing it to commit any changes that are still
-pending, as well as to avoid any function sequence errors upon closing
-each connection.
-
-
-\func{int }{wxDbConnectionsInUse}{\void}
-
-\wxheading{Remarks}
+\func{const wxChar *}{wxDbLogExtendedErrorMsg}{\param{const wxChar *}{userText}, \param{wxDb *}{pDb}, \param{wxChar *}{ErrFile}, \param{int }{ErrLine}}
-Returns a count of how many database connections are currently free ( not
-being used) that have been cached through use of the \helpref{wxDbGetConnection}{wxdbfunctions}
-function.
+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}}
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}}
+
+Returns the column name in a form ready for use in SQL statements.
+In most cases, the column name is returned verbatim. But some databases
+(e.g. MS Access, SQL Server, MSDE) allow for spaces in column names, which
+must be specially quoted. For example, if the datasource allows spaces
+in the column name, the returned string will have the correct enclosing
+marks around the name to allow it to be properly included in a SQL statement
+for the DBMS that is currently connected to with this connection.
+
+\wxheading{Parameters}
+
+\docparam{colName}{Native name of the column in the table that is to be
+evaluated to determine if any special quoting marks needed to be added to it
+before including the column name in a SQL statement}
+
+\wxheading{See also}
+
+\helpref{wxDb::SQLTableName}{wxdbsqltablename}
+
+
+\membersection{wxDb::SQLTableName}\label{wxdbsqltablename}
+
+\func{const wxString}{SQLTableName}{\param{const char *}{ tableName}}
+
+Returns the table name in a form ready for use in SQL statements.
+In most cases, the table name is returned verbatim. But some databases
+(e.g. MS Access, SQL Server, MSDE) allow for spaces in table names, which
+must be specially quoted. For example, if the datasource allows spaces
+in the table name, the returned string will have the correct enclosing
+marks around the name to allow it to be properly included in a SQL statement
+for the data source that is currently connected to with this connection.
+
+\wxheading{Parameters}
+
+\docparam{tableName}{Native name of the table that is to be evaluated to
+determine if any special quoting marks needed to be added to it
+before including the table name in a SQL statement}
+
+\wxheading{See also}
+
+\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=""}}
the constructor automatically.
+\section{\class{wxDbColFor}}\label{wxdbcolfor}
+
+Beginning support for handling international formatting specifically on dates
+and floats.
+
+\begin{verbatim}
+ wxString s_Field; // Formated String for Output
+ wxString s_Format[7]; // Formated Objects - TIMESTAMP has
+ the biggest (7)
+ wxString s_Amount[7]; // Formated Objects - amount of
+ things that can be formatted
+ int i_Amount[7]; // Formated 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:
+
+
+\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.
-\section{\class{wxDbColFor}}\label{wxdbcolfor}
-
-Beginning support for handling international formatting specifically on dates
-and floats.
-
-\begin{verbatim}
- wxString s_Field; // Formated String for Output
- wxString s_Format[7]; // Formated Objects - TIMESTAMP has
- the biggest (7)
- wxString s_Amount[7]; // Formated Objects - amount of
- things that can be formatted
- int i_Amount[7]; // Formated 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:
-
-
-\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{wxDbConnectInf}}\label{wxdbconnectinf}
This class is used for holding the data necessary for connecting to the ODBC
wxStrcpy(parts->PartName, "10");
wxStrcpy(parts->PartDesc, "Part #10");
parts->Qty = 1000;
- RETCODE retcode = parts.Insert();
+ RETCODE retcode = parts->Insert();
switch(retcode)
{
case DB_SUCCESS: