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
This commit is contained in:
@@ -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
|
||||
// <windows.h> directly when using MFC because it includes it itself in a
|
||||
// different manner
|
||||
#if wxUSE_MFC
|
||||
#include <afxwin.h>
|
||||
#else // !wxUSE_MFC
|
||||
#ifndef STRICT
|
||||
#define STRICT 1
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#include "wx/msw/winundef.h"
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#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 <isql.h>
|
||||
#include <isqlext.h>
|
||||
}
|
||||
#else
|
||||
extern "C" {
|
||||
#include "wx/isql.h"
|
||||
#include "wx/isqlext.h"
|
||||
}
|
||||
// For OpenVMS use the ones from the library
|
||||
extern "C" {
|
||||
#include <isql.h>
|
||||
#include <isqlext.h>
|
||||
}
|
||||
#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_
|
||||
|
||||
|
Reference in New Issue
Block a user