X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd3f686c274a264e89ea97505350a82c1134f307..236a9de39afa090fdee3cf91cb5364ceca69e3f8:/src/common/odbc.cpp diff --git a/src/common/odbc.cpp b/src/common/odbc.cpp index 576ee3a487..bdf71719d7 100644 --- a/src/common/odbc.cpp +++ b/src/common/odbc.cpp @@ -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__ @@ -23,9 +23,13 @@ #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 -#ifdef _MSC_VER +#if wxUSE_OLD_ODBC + +#ifdef __VISUALC__ #pragma warning(disable:4706) // assignment within conditional expression #endif // VC++ @@ -47,12 +51,10 @@ 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); } /* @@ -1831,8 +1833,8 @@ bool wxQueryField::IsDirty(void) { return dirty; } -#ifdef _MSC_VER +#ifdef __VISUALC__ #pragma warning(default:4706) // assignment within conditional expression #endif // VC++ -#endif // wxUSE_ODBC +#endif // wxUSE_OLD_ODBC