X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bb41dcbe3a1ee4df0cd6a44e9cfb6a55b5d94fd6..553c5bcc3ab65e8b8a002dc6d5f51cba4f39292c:/include/wx/db.h diff --git a/include/wx/db.h b/include/wx/db.h index 5236bdfda3..58843cf23e 100644 --- a/include/wx/db.h +++ b/include/wx/db.h @@ -43,7 +43,7 @@ #include "wx/version.h" -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "db.h" #endif @@ -77,14 +77,19 @@ #include "sqlext.h" #include "odbcinst.h" #else - #if defined(__WINDOWS__) && defined(HAVE_W32API_H) + #if defined(__WINDOWS__) && ( defined(HAVE_W32API_H) || defined(__BORLANDC__) ) #include #include "wx/msw/winundef.h" #endif - // Use the ones from the library extern "C" { + #if defined(wxUSE_BUILTIN_IODBC) && wxUSE_BUILTIN_IODBC + // Use the ones from the library + #include "wx/isql.h" + #include "wx/isqlext.h" + #else #include #include + #endif } #endif @@ -94,6 +99,11 @@ typedef double SDOUBLE; typedef unsigned int UINT; #define ULONG UDWORD +// Not available in iODBC +#ifndef __WXMSW__ +typedef UCHAR SQLTCHAR; +#endif + #ifndef wxODBC_FWD_ONLY_CURSORS #define wxODBC_FWD_ONLY_CURSORS 1 #endif @@ -481,7 +491,7 @@ private: wxDBMS dbmsType; // Type of datasource - i.e. Oracle, dBase, SQLServer, etc // Private member functions - bool getDbInfo(void); + bool getDbInfo(bool failOnDataTypeUnsupported = TRUE); bool getDataTypeInfo(SWORD fSqlType, wxDbSqlTypeInfo &structSQLTypeInfo); bool setConnectionOptions(void); void logError(const wxString &errMsg, const wxString &SQLState); @@ -714,7 +724,7 @@ int WXDLLIMPEXP_ODBC wxDbConnectionsInUse(void); // Writes a message to the wxLog window (stdout usually) when an internal error // situation occurs. This function only works in DEBUG builds -const wxChar* WXDLLIMPEXP_ODBC +const wxChar WXDLLIMPEXP_ODBC * wxDbLogExtendedErrorMsg(const wxChar *userText, wxDb *pDb, const wxChar *ErrFile,