X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af49c4b8a2d3553e733e71c7dd3911881f4c1a2a..4fab71288ea3629e48fe100b337d9465266ef149:/include/wx/dbtable.h diff --git a/include/wx/dbtable.h b/include/wx/dbtable.h index a005b30afc..a6b3bd34cb 100644 --- a/include/wx/dbtable.h +++ b/include/wx/dbtable.h @@ -8,16 +8,7 @@ // Created: 9.96 // RCS-ID: $Id$ // Copyright: (c) 1996 Remstar International, Inc. -// Licence: wxWindows licence, plus: -// Notice: This class library and its intellectual design are free of charge for use, -// modification, enhancement, debugging under the following conditions: -// 1) These classes may only be used as part of the implementation of a -// wxWindows-based application -// 2) All enhancements and bug fixes are to be submitted back to the wxWindows -// user groups free of all charges for use with the wxWindows library. -// 3) These classes may not be distributed as part of any other class library, -// DLL, text (written or electronic), other than a complete distribution of -// the wxWindows GUI development toolkit. +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// /* @@ -30,7 +21,7 @@ #include "wx/version.h" -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "dbtable.h" #endif @@ -56,7 +47,7 @@ const int wxDB_NO_MORE_COLUMN_NUMBERS = -1; // wxDbTable class which allows it to create a table in the data // source, exchange data between the data source and the C++ // object, and so on. -class WXDLLEXPORT wxDbColDef +class WXDLLIMPEXP_ODBC wxDbColDef { public: wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name @@ -77,7 +68,7 @@ public: }; // wxDbColDef -class WXDLLEXPORT wxDbColDataPtr +class WXDLLIMPEXP_ODBC wxDbColDataPtr { public: void *PtrDataObj; @@ -87,7 +78,7 @@ public: // This structure is used when creating secondary indexes. -class WXDLLEXPORT wxDbIdxDef +class WXDLLIMPEXP_ODBC wxDbIdxDef { public: wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1]; @@ -95,7 +86,7 @@ public: }; // wxDbIdxDef -class WXDLLEXPORT wxDbTable +class WXDLLIMPEXP_ODBC wxDbTable { private: ULONG tableID; // Used for debugging. This can help to match up mismatched constructors/destructors @@ -109,6 +100,7 @@ private: const wxString &qryTblName, bool qryOnly, const wxString &tblPath); void cleanup(); + void setCbValueForColumn(int columnIndex); bool bindParams(bool forUpdate); // called by the other 'bind' functions bool bindInsertParams(void); bool bindUpdateParams(void); @@ -189,13 +181,13 @@ public: #endif // Public member functions wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns, - const wxString &qryTblName="", bool qryOnly = !wxDB_QUERY_ONLY, - const wxString &tblPath=""); + const wxString &qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY, + const wxString &tblPath=wxEmptyString); // DEPRECATED wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns, - const wxChar *qryTblName="", bool qryOnly = !wxDB_QUERY_ONLY, - const wxString &tblPath=""); + const wxChar *qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY, + const wxString &tblPath=wxEmptyString); virtual ~wxDbTable(); @@ -267,14 +259,14 @@ public: void BuildSelectStmt(wxString &pSqlStmt, int typeOfSelect, bool distinct); void BuildSelectStmt(wxChar *pSqlStmt, int typeOfSelect, bool distinct); - void BuildDeleteStmt(wxString &pSqlStmt, int typeOfDel, const wxString &pWhereClause=""); - void BuildDeleteStmt(wxChar *pSqlStmt, int typeOfDel, const wxString &pWhereClause=""); + void BuildDeleteStmt(wxString &pSqlStmt, int typeOfDel, const wxString &pWhereClause=wxEmptyString); + void BuildDeleteStmt(wxChar *pSqlStmt, int typeOfDel, const wxString &pWhereClause=wxEmptyString); - void BuildUpdateStmt(wxString &pSqlStmt, int typeOfUpd, const wxString &pWhereClause=""); - void BuildUpdateStmt(wxChar *pSqlStmt, int typeOfUpd, const wxString &pWhereClause=""); + void BuildUpdateStmt(wxString &pSqlStmt, int typeOfUpd, const wxString &pWhereClause=wxEmptyString); + void BuildUpdateStmt(wxChar *pSqlStmt, int typeOfUpd, const wxString &pWhereClause=wxEmptyString); - void BuildWhereClause(wxString &pWhereClause, int typeOfWhere, const wxString &qualTableName="", bool useLikeComparison=FALSE); - void BuildWhereClause(wxChar *pWhereClause, int typeOfWhere, const wxString &qualTableName="", bool useLikeComparison=FALSE); + void BuildWhereClause(wxString &pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=FALSE); + void BuildWhereClause(wxChar *pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=FALSE); #if wxODBC_BACKWARD_COMPATABILITY // The following member functions are deprecated. You should use the BuildXxxxxStmt functions (above) @@ -311,7 +303,7 @@ public: HSTMT *NewCursor(bool setCursor = FALSE, bool bindColumns = TRUE) { return GetNewCursor(setCursor,bindColumns); } #endif - ULONG Count(const wxString &args="*"); + ULONG Count(const wxString &args=_T("*")); int DB_STATUS(void) { return(pDb->DB_STATUS); } bool IsColNull(UWORD colNo) const;