diff --git a/include/wx/dbtable.h b/include/wx/dbtable.h index 78aaffe00d..d50b32e1c7 100644 --- a/include/wx/dbtable.h +++ b/include/wx/dbtable.h @@ -106,7 +106,7 @@ private: bool getRec(UWORD fetchType); bool execDelete(const char *pSqlStmt); bool execUpdate(const char *pSqlStmt); - bool query(int queryType, bool forUpdate, bool distinct, char *pSqlStmt = 0); + bool query(int queryType, bool forUpdate, bool distinct, const char *pSqlStmt = 0); public: // Pointer to the database object this table belongs to @@ -160,7 +160,7 @@ public: bool DeleteWhere(const char *pWhereClause); bool DeleteMatching(void); virtual bool Query(bool forUpdate = FALSE, bool distinct = FALSE); - bool QueryBySqlStmt(char *pSqlStmt); + bool QueryBySqlStmt(const char *pSqlStmt); bool QueryMatching(bool forUpdate = FALSE, bool distinct = FALSE); bool QueryOnKeyFields(bool forUpdate = FALSE, bool distinct = FALSE); bool GetNext(void) { return(getRec(SQL_FETCH_NEXT)); } diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index 51c2b61a4e..1bd0469258 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -536,7 +536,7 @@ bool wxDbTable::execUpdate(const char *pSqlStmt) /********** wxDbTable::query() **********/ -bool wxDbTable::query(int queryType, bool forUpdate, bool distinct, char *pSqlStmt) +bool wxDbTable::query(int queryType, bool forUpdate, bool distinct, const char *pSqlStmt) { char sqlStmt[DB_MAX_STATEMENT_LEN]; @@ -666,7 +666,7 @@ bool wxDbTable::Query(bool forUpdate, bool distinct) /********** wxDbTable::QueryBySqlStmt() **********/ -bool wxDbTable::QueryBySqlStmt(char *pSqlStmt) +bool wxDbTable::QueryBySqlStmt(const char *pSqlStmt) { pDb->WriteSqlLog(pSqlStmt);