]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/db.h
added wxGetCCDefaultFont() returning the default icon font
[wxWidgets.git] / include / wx / db.h
index 7fa3a52bc63791a9a72e5f8e67de6c9c45f17d03..58843cf23e399cf73e1de1760327427dfb5926d4 100644 (file)
     #include "sqlext.h"
     #include "odbcinst.h"
 #else
     #include "sqlext.h"
     #include "odbcinst.h"
 #else
-    #if defined(__WINDOWS__) && defined(HAVE_W32API_H)
+    #if defined(__WINDOWS__) && ( defined(HAVE_W32API_H) || defined(__BORLANDC__) )
         #include <windows.h>
         #include "wx/msw/winundef.h"
     #endif
         #include <windows.h>
         #include "wx/msw/winundef.h"
     #endif
-    // Use the ones from the library
     extern "C" {
     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 <sql.h>
         #include <sqlext.h>
         #include <sql.h>
         #include <sqlext.h>
+    #endif
     }
 #endif
 
     }
 #endif
 
@@ -94,6 +99,11 @@ typedef double SDOUBLE;
 typedef unsigned int UINT;
 #define ULONG UDWORD
 
 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
 #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
     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);
     bool             getDataTypeInfo(SWORD fSqlType, wxDbSqlTypeInfo &structSQLTypeInfo);
     bool             setConnectionOptions(void);
     void             logError(const wxString &errMsg, const wxString &SQLState);