Fixed TablePrivileges() function (I HOPE!) so it will work with all supported databases

All variables/parameters having to do with number of columns changed to be of type UWORD rather than int, avoiding compiler warnings and giant tables causing problems, and matching the types with the ODBC APIs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2001-04-11 14:11:02 +00:00
parent 6b3f4fb875
commit 02cf6fdd85
3 changed files with 36 additions and 30 deletions

View File

@@ -339,7 +339,7 @@ class WXDLLEXPORT wxDbConnectInf
struct WXDLLEXPORT wxDbSqlTypeInfo
{
wxString TypeName;
int FsqlType;
SWORD FsqlType;
long Precision;
short CaseSensitive;
// short MinimumScale;
@@ -404,7 +404,7 @@ public:
wxChar tableName[DB_MAX_TABLE_NAME_LEN+1];
wxChar tableType[254+1]; // "TABLE" or "SYSTEM TABLE" etc.
wxChar tableRemarks[254+1];
int numCols; // How many Columns does this Table have: GetColumnCount(..);
UWORD numCols; // How many Columns does this Table have: GetColumnCount(..);
wxDbColInf *pColInf; // pColInf = NULL ; User can later call GetColumns(..);
wxDbTableInf();
@@ -609,12 +609,12 @@ 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, int nocols);
int GetKeyFields(const wxString &tableName, wxDbColInf* colInf, UWORD noCols);
wxDbColInf *GetColumns(wxChar *tableName[], const wxChar *userID=NULL);
wxDbColInf *GetColumns(const wxString &tableName, int *numCols, const wxChar *userID=NULL);
wxDbColInf *GetColumns(const wxString &tableName, UWORD *numCols, const wxChar *userID=NULL);
int GetColumnCount(const wxString &tableName, const wxChar *userID=NULL);
UWORD 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;}