X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dba2120c77bf1ee0822a389302b9e8c93f08fa4f..8366ae934aab9f835747b0c2e456231e8795fe78:/include/wx/db.h?ds=sidebyside diff --git a/include/wx/db.h b/include/wx/db.h index 86fa70404c..adfbd49b11 100644 --- a/include/wx/db.h +++ b/include/wx/db.h @@ -54,6 +54,9 @@ #include "wx/setup.h" +#include "wx/defs.h" +#include "wx/string.h" + extern "C" { #ifdef __VISUALC__ // If you use the wxDbCreateDataSource() function with MSW/VC6, @@ -624,6 +627,14 @@ public: const wxChar *userID=NULL, const wxChar *schema=NULL, const wxString &path=wxEmptyString); + // These two functions return the table name or column name in a form ready + // for use in SQL statements. For example, if the datasource allows spaces + // in the table name or 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 + const wxString SQLTableName(const char *tableName); + const wxString SQLColumnName(const char *colName); + void LogError(const wxString &errMsg, const wxString &SQLState = wxEmptyString) { logError(errMsg, SQLState); } void SetDebugErrorMessages(bool state) { silent = !state; }