Provided wxDB_XXXX naming for constants

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2000-04-03 22:34:18 +00:00
parent d22a51d11e
commit 91eebab42f
4 changed files with 25 additions and 17 deletions

View File

@@ -93,7 +93,7 @@ enum enumDummy {enumDum1};
#define FALSE 0
#endif
const int DB_PATH_MAX = 254;
const int wxDB_PATH_MAX = 254;
extern char const *SQL_LOG_FILENAME;
extern char const *SQL_CATALOG_FILENAME;
@@ -243,7 +243,7 @@ struct wxDbConnectInf
char fileType[SQL_MAX_DSN_LENGTH+1]; // Not sure what the max length is
// Optionals needed for some databases like dBase
char defaultDir[DB_PATH_MAX]; // Directory that db file resides in
char defaultDir[wxDB_PATH_MAX]; // Directory that db file resides in
};
struct wxDbSqlTypeInfo
@@ -534,6 +534,8 @@ bool WXDLLEXPORT wxDbGetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsD
//#################################################################################
// Backward compability structures/classes. This will eventually go away
const int DB_PATH_MAX = wxDB_PATH_MAX;
typedef wxDb wxDB;
typedef wxDbTableInf wxTableInf;
typedef wxDbColInf wxColInf;

View File

@@ -43,10 +43,10 @@
#include "db.h"
#endif
const int ROWID_LEN = 24; // 18 is the max, 24 is in case it gets larger
const int DEFAULT_CURSOR = 0;
const bool QUERY_ONLY = TRUE;
const bool DISABLE_VIEW = TRUE;
const int wxDB_ROWID_LEN = 24; // 18 is the max, 24 is in case it gets larger
const int wxDB_DEFAULT_CURSOR = 0;
const bool wxDB_QUERY_ONLY = TRUE;
const bool wxDB_DISABLE_VIEW = TRUE;
// The following class is used to define a column of a table.
// The wxDbTable constructor will dynamically allocate as many of
@@ -129,7 +129,7 @@ public:
int noCols; // # of columns in the table
bool queryOnly; // Query Only, no inserts, updates or deletes
char tablePath[DB_PATH_MAX]; // needed for dBase tables
char tablePath[wxDB_PATH_MAX]; // needed for dBase tables
// Column Definitions
wxDbColDef *colDefs; // Array of wxDbColDef structures
@@ -144,7 +144,7 @@ public:
// Public member functions
wxDbTable(wxDb *pwxDb, const char *tblName, const int nCols,
const char *qryTblName = 0, bool qryOnly = !QUERY_ONLY, const char *tblPath=NULL);
const char *qryTblName = 0, bool qryOnly = !wxDB_QUERY_ONLY, const char *tblPath=NULL);
virtual ~wxDbTable();
bool Open(void);
bool CreateTable(bool attemptDrop=TRUE);
@@ -191,7 +191,7 @@ public:
HSTMT *NewCursor(bool setCursor = FALSE, bool bindColumns = TRUE);
bool DeleteCursor(HSTMT *hstmtDel);
void SetCursor(HSTMT *hstmtActivate = (void **) DEFAULT_CURSOR);
void SetCursor(HSTMT *hstmtActivate = (void **) wxDB_DEFAULT_CURSOR);
HSTMT GetCursor(void) { return(hstmt); }
ULONG Count(const char *args="*");
int DB_STATUS(void) { return(pDb->DB_STATUS); }
@@ -221,6 +221,12 @@ typedef wxDbColDef CcolDef;
typedef wxDbColDataPtr wxColDataPtr;
typedef wxDbColDataPtr CcolDataPtr;
const int ROWID = wxDB_ROWID_LEN;
const int DEFAULT_CURSOR = wxDB_DEFAULT_CURSOR;
const bool QUERY_ONLY = wxDB_QUERY_ONLY;
const bool DISABLE_VIEW = wxDB_DISABLE_VIEW;
#endif
#endif