]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/odbc.cpp
Attempt to implement a bunch of wx string.h equivalents.
[wxWidgets.git] / src / common / odbc.cpp
index 79d1f9b9dfddd8d67c793ae42462b2b41d20c348..f82a986409db28e6e0a71ec989f71785260444b3 100644 (file)
@@ -2,12 +2,12 @@
 // Name:        odbc.cpp
 // Purpose:     ODBC implementation
 // Author:      Julian Smart, Olaf Klein (oklein@smallo.ruhr.de),
-//               Patrick Halke (patrick@zaphod.ruhr.de)
-// Modified by:        
+//              Patrick Halke (patrick@zaphod.ruhr.de)
+// Modified by:
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
 
 #include "wx/defs.h"
 
-#if USE_ODBC
+#if wxUSE_ODBC
+
+#ifdef __VISUALC__
+    #pragma warning(disable:4706)   // assignment within conditional expression
+#endif // VC++
 
 #ifndef WX_PRECOMP
 #include "wx/utils.h"
@@ -607,14 +611,14 @@ bool wxRecordSet::GetResultSet(void)
     curcol = cols.Append(name, col1);
     col1->SetName(name);
     col1->SetType(type);
-    col1->SetNullable(nullable);
+    col1->SetNullable((nullable != 0));
 
     wxQueryField *field1 = new wxQueryField;
     fetch = fetchbuf.Append(field1);
     field1->SetType(type);
     field1->SetSize(len);
     
-    SQLBindCol(hStmt, i+1, SQL_C_BINARY, field1->GetData(), field1->GetSize(), &trash);
+    SQLBindCol(hStmt, i+1, SQL_C_BINARY, (unsigned char*)field1->GetData(), field1->GetSize(), &trash);
   }
   
   switch (type) {
@@ -1827,4 +1831,8 @@ bool wxQueryField::IsDirty(void) {
   return dirty;
 }
 
-#endif // USE_ODBC
+#ifdef __VISUALC__
+    #pragma warning(default:4706)   // assignment within conditional expression
+#endif // VC++
+
+#endif // wxUSE_ODBC