From 2a32fcda98b14722883c7acf2cb11f0686f02384 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 18 Sep 2002 14:09:15 +0000 Subject: [PATCH] include afxwin.h #if wxUSE_MFC to get windows.h in this case as well; minor formatting fixes and one char -> wxChar change git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/db.h | 68 ++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/include/wx/db.h b/include/wx/db.h index e43e77db95..531a348d53 100644 --- a/include/wx/db.h +++ b/include/wx/db.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: db.h +// Name: wx/db.h // Purpose: Header file wxDb class. The wxDb class represents a connection // to an ODBC data source. The wxDb class allows operations on the data // source such as opening and closing the data source. @@ -32,13 +32,8 @@ // /////////////////////////////////////////////////////////////////////////////// -/* -// SYNOPSIS START -// SYNOPSIS STOP -*/ - -#ifndef DB_DOT_H -#define DB_DOT_H +#ifndef _WX_DB_H_ +#define _WX_DB_H_ // BJO 20000503: introduce new GetColumns members which are more database independant and @@ -58,36 +53,40 @@ #include "wx/string.h" #ifdef __VISUALC__ -// include standard Windows headers -#if defined(__WXMSW__) && !wxUSE_MFC - #ifndef STRICT - #define STRICT 1 - #endif + // we need to include standard Windows headers but we can't include + // directly when using MFC because it includes it itself in a + // different manner + #if wxUSE_MFC + #include + #else // !wxUSE_MFC + #ifndef STRICT + #define STRICT 1 + #endif - #include - #include "wx/msw/winundef.h" -#endif + #include + #include "wx/msw/winundef.h" + #endif // wxUSE_MFC/!wxUSE_MFC -// If you use the wxDbCreateDataSource() function with MSW/VC6, -// you cannot use the iODBC headers, you must use the VC headers, -// plus the odbcinst.h header - gt Nov 2 2000 -// -// Must add "odbccp32.lib" in \wx2\wxWindows\src\makevc.env to the WINLIBS= line -// + // If you use the wxDbCreateDataSource() function with MSW/VC6, + // you cannot use the iODBC headers, you must use the VC headers, + // plus the odbcinst.h header - gt Nov 2 2000 + // + // Must add "odbccp32.lib" in \wx2\wxWindows\src\makevc.env to the WINLIBS= line + // #include "sql.h" #include "sqlext.h" #include "odbcinst.h" #elif defined( __VMS ) -// For OpenVMS use the ones from the library -extern "C" { - #include - #include -} -#else -extern "C" { - #include "wx/isql.h" - #include "wx/isqlext.h" -} + // For OpenVMS use the ones from the library + extern "C" { + #include + #include + } +#else // !__VISUALC__, !__VMS + extern "C" { + #include "wx/isql.h" + #include "wx/isqlext.h" + } #endif @@ -772,10 +771,11 @@ bool WXDLLEXPORT FreeDbConnection(wxDB *pDb); void WXDLLEXPORT CloseDbConnections(void); int WXDLLEXPORT NumberDbConnectionsInUse(void); -bool SqlLog(sqlLog state, const char *filename = SQL_LOG_FILENAME); +bool SqlLog(sqlLog state, const wxChar *filename = SQL_LOG_FILENAME); bool WXDLLEXPORT GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDescMax, UWORD direction = SQL_FETCH_NEXT); #endif // Deprecated structures/classes/functions -#endif +#endif // _WX_DB_H_ +