]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dbtable.h
Fix for Bug #229543
[wxWidgets.git] / include / wx / dbtable.h
index 56f31062366190945fbe9a49c01d9c10c7a21d44..2e98f16b35ab7c3a646243db9c25dac31e9d34f3 100644 (file)
@@ -76,6 +76,10 @@ public:
     bool    DerivedCol;                         // Specifies whether this column is a derived value
     SDWORD  CbValue;                            // Internal use only!!!
     bool    Null;                               // NOT FULLY IMPLEMENTED - Allows NULL values in Inserts and Updates
+
+    wxDbColDef();
+
+    bool    Initialize();
 };  // wxDbColDef
 
 
@@ -119,7 +123,7 @@ private:
     bool        getRec(UWORD fetchType);
     bool        execDelete(const wxString &pSqlStmt);
     bool        execUpdate(const wxString &pSqlStmt);
-    bool        query(int queryType, bool forUpdate, bool distinct, const wxString &pSqlStmt=wxT(""));
+    bool        query(int queryType, bool forUpdate, bool distinct, const wxString &pSqlStmt=wxEmptyString);
 
 #if !wxODBC_BACKWARD_COMPATABILITY
 // these were public
@@ -191,18 +195,21 @@ public:
 #endif
     // Public member functions
     wxDbTable(wxDb *pwxDb, const wxString &tblName, const int nCols,
-              const wxString &qryTblName = "", bool qryOnly = !wxDB_QUERY_ONLY, const wxString &tblPath="");
+              const wxString &qryTblName="", bool qryOnly = !wxDB_QUERY_ONLY, 
+              const wxString &tblPath="");
 
     // DEPRECATED
     wxDbTable(wxDb *pwxDb, const wxString &tblName, const int nCols,
-              const wxChar *qryTblName = "", bool qryOnly = !wxDB_QUERY_ONLY, const wxString &tblPath="");
+              const wxChar *qryTblName="", bool qryOnly = !wxDB_QUERY_ONLY, 
+              const wxString &tblPath="");
 
     virtual ~wxDbTable();
 
     bool            Open(bool checkPrivileges=FALSE);
     bool            CreateTable(bool attemptDrop=TRUE);
     bool            DropTable(void);
-    bool            CreateIndex(const wxString &idxName, bool unique, int noIdxCols, wxDbIdxDef *pIdxDefs, bool attemptDrop=TRUE);
+    bool            CreateIndex(const wxString &idxName, bool unique, int noIdxCols, 
+                                wxDbIdxDef *pIdxDefs, bool attemptDrop=TRUE);
     bool            DropIndex(const wxString &idxName);
 
     // Accessors
@@ -228,13 +235,13 @@ public:
     void            SetOrderByClause(const char *OrderBy) { orderBy = (char *)OrderBy; }
     void            SetWhereClause(const char *Where) { where = (char *)Where; }
 #else
-    void            SetFromClause(const wxStringFrom) { from = From; }
-    void            SetOrderByClause(const wxStringOrderBy) { orderBy = OrderBy; }
+    void            SetFromClause(const wxString &From) { from = From; }
+    void            SetOrderByClause(const wxString &OrderBy) { orderBy = OrderBy; }
     bool            SetOrderByColNums(int first, ...);
-    void            SetWhereClause(const wxStringWhere) { where = Where; }
-    void            From(const wxStringFrom) { from = From; }
-    void            OrderBy(const wxStringOrderBy) { orderBy = OrderBy; }
-    void            Where(const wxStringWhere) { where = Where; }
+    void            SetWhereClause(const wxString &Where) { where = Where; }
+    void            From(const wxString &From) { from = From; }
+    void            OrderBy(const wxString &OrderBy) { orderBy = OrderBy; }
+    void            Where(const wxString &Where) { where = Where; }
     const wxString &Where()   { return where; }
     const wxString &OrderBy() { return orderBy; }
     const wxString &From()    { return from; }
@@ -295,7 +302,8 @@ public:
     bool            SetQueryTimeout(UDWORD nSeconds);
 
     wxDbColDef     *GetColDefs() { return colDefs; }
-    void            SetColDefs(int index, const wxString &fieldName, int dataType, void *pData, int cType,
+    void            SetColDefs(int index, const wxString &fieldName, int dataType, 
+                               void *pData, int cType,
                                int size, bool keyField = FALSE, bool upd = TRUE,
                                bool insAllow = TRUE, bool derivedCol = FALSE);
     wxDbColDataPtr *SetColDefs(wxDbColInf *colInfs, ULONG numCols);