- bool Grant(int privileges, const char *tableName, const char *userList = "PUBLIC");
- int TranslateSqlState(const wxChar *SQLState);
- wxDbInf *GetCatalog(char *userID);
- bool Catalog(const char *userID=NULL, const char *fileName = SQL_CATALOG_FILENAME);
- int GetKeyFields(char *tableName, wxDbColInf* colInf, int nocols);
-
- wxDbColInf *GetColumns(char *tableName[], const char *userID=NULL);
- wxDbColInf *GetColumns(char *tableName, int *numCols, const char *userID=NULL);
-
- int GetColumnCount(char *tableName, const char *userID=NULL);
- const char *GetDatabaseName(void) {return dbInf.dbmsName;}
- const char *GetDataSource(void) {return (const char *)dsn;}
- const char *GetDatasourceName(void){return (const char *)dsn;}
- const char *GetUsername(void) {return (const char *)uid;}
- const char *GetPassword(void) {return (const char *)authStr;}
- bool IsOpen(void) {return dbIsOpen;}
- HENV GetHENV(void) {return henv;}
- HDBC GetHDBC(void) {return hdbc;}
- HSTMT GetHSTMT(void) {return hstmt;}
- int GetTableCount() {return nTables;}; // number of tables using this connection
- wxDbSqlTypeInfo GetTypeInfVarchar() {return typeInfVarchar;}
- wxDbSqlTypeInfo GetTypeInfInteger() {return typeInfInteger;}
- wxDbSqlTypeInfo GetTypeInfFloat() {return typeInfFloat;}
- wxDbSqlTypeInfo GetTypeInfDate() {return typeInfDate;}
-
- bool TableExists(const char *tableName, const char *userID=NULL, const char *path=NULL); // Table name can refer to a table, view, alias or synonym
- bool TablePrivileges(const char *tableName, const char* priv, const char *userID="", const char *schema=NULL, const char *path=""); // Table name can refer to a table, view, alias or synonym
- void LogError(const char *errMsg, const char *SQLState = NULL) {logError(errMsg, SQLState);}
+ bool Grant(int privileges, const wxString &tableName, const wxString &userList = wxT("PUBLIC"));
+ int TranslateSqlState(const wxString &SQLState);
+ wxDbInf *GetCatalog(const wxChar *userID=NULL);
+ bool Catalog(const wxChar *userID=NULL, const wxString &fileName=SQL_CATALOG_FILENAME);
+ int GetKeyFields(const wxString &tableName, wxDbColInf* colInf, UWORD noCols);
+
+ wxDbColInf *GetColumns(wxChar *tableName[], const wxChar *userID=NULL);
+ wxDbColInf *GetColumns(const wxString &tableName, UWORD *numCols, const wxChar *userID=NULL);
+
+ int GetColumnCount(const wxString &tableName, const wxChar *userID=NULL);
+ const wxChar *GetDatabaseName(void) {return dbInf.dbmsName;}
+ const wxString &GetDataSource(void) {return dsn;}
+ const wxString &GetDatasourceName(void){return dsn;}
+ const wxString &GetUsername(void) {return uid;}
+ const wxString &GetPassword(void) {return authStr;}
+ bool IsOpen(void) {return dbIsOpen;}
+ HENV GetHENV(void) {return henv;}
+ HDBC GetHDBC(void) {return hdbc;}
+ HSTMT GetHSTMT(void) {return hstmt;}
+ int GetTableCount() {return nTables;} // number of tables using this connection
+ wxDbSqlTypeInfo GetTypeInfVarchar() {return typeInfVarchar;}
+ wxDbSqlTypeInfo GetTypeInfInteger() {return typeInfInteger;}
+ wxDbSqlTypeInfo GetTypeInfFloat() {return typeInfFloat;}
+ wxDbSqlTypeInfo GetTypeInfDate() {return typeInfDate;}
+ wxDbSqlTypeInfo GetTypeInfBlob() {return typeInfBlob;}
+
+ // tableName can refer to a table, view, alias or synonym
+ bool TableExists(const wxString &tableName, const wxChar *userID=NULL,
+ const wxString &tablePath=wxEmptyString);
+ bool TablePrivileges(const wxString &tableName, const wxString &priv,
+ const wxChar *userID=NULL, const wxChar *schema=NULL,
+ const wxString &path=wxEmptyString);
+
+ void LogError(const wxString &errMsg, const wxString &SQLState = wxEmptyString)
+ { logError(errMsg, SQLState); }