Unicode support

Several error conditions when connecting to databases are corrected


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2004-11-04 21:31:12 +00:00
parent be7eecf834
commit e4e4557315
3 changed files with 157 additions and 136 deletions

View File

@@ -83,6 +83,11 @@
}
#endif
#if wxUSE_UNICODE
#define SQL_C_WXCHAR SQL_C_WCHAR
#else
#define SQL_C_WXCHAR SQL_C_CHAR
#endif
typedef float SFLOAT;
typedef double SDOUBLE;
@@ -365,7 +370,7 @@ public:
~wxDbColFor(){}
void Initialize();
int Format(int Nation, int dbDataType, SWORD sqlDataType, short columnSize, short decimalDigits);
int Format(int Nation, int dbDataType, SWORD sqlDataType, short columnLength, short decimalDigits);
};
@@ -378,8 +383,8 @@ public:
wxChar colName[DB_MAX_COLUMN_NAME_LEN+1];
SWORD sqlDataType;
wxChar typeName[128+1];
SWORD columnSize;
SWORD bufferLength;
SWORD columnLength;
SWORD bufferSize;
short decimalDigits;
short numPrecRadix;
short nullable;
@@ -750,8 +755,8 @@ int WXDLLEXPORT wxDbCreateDataSource(const wxString &driverName, const wxString
// the first time using SQL_FETCH_FIRST. Continue to call it
// using SQL_FETCH_NEXT until you've exhausted the list.
bool WXDLLIMPEXP_ODBC
wxDbGetDataSource(HENV henv, wxChar *Dsn, SWORD DsnMax, wxChar *DsDesc,
SWORD DsDescMax, UWORD direction = SQL_FETCH_NEXT);
wxDbGetDataSource(HENV henv, wxChar *Dsn, SWORD DsnMaxLength, wxChar *DsDesc,
SWORD DsDescMaxLength, UWORD direction = SQL_FETCH_NEXT);
// Change this to 0 to remove use of all deprecated functions
@@ -791,7 +796,7 @@ int WXDLLIMPEXP_ODBC NumberDbConnectionsInUse(void);
bool SqlLog(sqlLog state, const wxChar *filename = SQL_LOG_FILENAME);
bool WXDLLIMPEXP_ODBC
GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDescMax,
GetDataSource(HENV henv, char *Dsn, SWORD DsnMaxLength, char *DsDesc, SWORD DsDescMaxLength,
UWORD direction = SQL_FETCH_NEXT);
#endif // Deprecated structures/classes/functions