]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/odbc.cpp
added a PROIO_yyparse function in order to compile again after defines have moved...
[wxWidgets.git] / src / common / odbc.cpp
index f82a986409db28e6e0a71ec989f71785260444b3..bdf71719d7dd81adf4de93523c338b547bc29148 100644 (file)
 
 #include "wx/defs.h"
 
-#if wxUSE_ODBC
+// this code is old and shouldn't be used - use the new ODBC classes in db.cpp
+// and dbtable.cpp instead
+#define wxUSE_OLD_ODBC 0
+
+#if wxUSE_OLD_ODBC
 
 #ifdef __VISUALC__
     #pragma warning(disable:4706)   // assignment within conditional expression
 HENV wxDatabase::hEnv = 0;
 int wxDatabase::refCount = 0;
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxDatabase, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxQueryCol, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxQueryField, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxRecordSet, wxObject)
-#endif
 
 wxDatabase::wxDatabase(void)
 {
@@ -443,7 +445,7 @@ float wxDatabase::GetODBCVersionFloat(bool implementation)
   if (retcode == SQL_ERROR)
     return 0.0;
   else
-    return atof(buf);
+    return (float)atof(buf);
 }
 
 /*
@@ -1835,4 +1837,4 @@ bool wxQueryField::IsDirty(void) {
     #pragma warning(default:4706)   // assignment within conditional expression
 #endif // VC++
 
-#endif // wxUSE_ODBC
+#endif // wxUSE_OLD_ODBC