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
|
// Purpose: Header file wxDb class. The wxDb class represents a connection
|
||||||
// to an ODBC data source. The wxDb class allows operations on the data
|
// to an ODBC data source. The wxDb class allows operations on the data
|
||||||
// source such as opening and closing the data source.
|
// source such as opening and closing the data source.
|
||||||
@@ -32,13 +32,8 @@
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/*
|
#ifndef _WX_DB_H_
|
||||||
// SYNOPSIS START
|
#define _WX_DB_H_
|
||||||
// SYNOPSIS STOP
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef DB_DOT_H
|
|
||||||
#define DB_DOT_H
|
|
||||||
|
|
||||||
|
|
||||||
// BJO 20000503: introduce new GetColumns members which are more database independant and
|
// BJO 20000503: introduce new GetColumns members which are more database independant and
|
||||||
@@ -58,36 +53,40 @@
|
|||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
|
|
||||||
#ifdef __VISUALC__
|
#ifdef __VISUALC__
|
||||||
// include standard Windows headers
|
// we need to include standard Windows headers but we can't include
|
||||||
#if defined(__WXMSW__) && !wxUSE_MFC
|
// <windows.h> directly when using MFC because it includes it itself in a
|
||||||
#ifndef STRICT
|
// different manner
|
||||||
#define STRICT 1
|
#if wxUSE_MFC
|
||||||
#endif
|
#include <afxwin.h>
|
||||||
|
#else // !wxUSE_MFC
|
||||||
|
#ifndef STRICT
|
||||||
|
#define STRICT 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "wx/msw/winundef.h"
|
#include "wx/msw/winundef.h"
|
||||||
#endif
|
#endif // wxUSE_MFC/!wxUSE_MFC
|
||||||
|
|
||||||
// If you use the wxDbCreateDataSource() function with MSW/VC6,
|
// If you use the wxDbCreateDataSource() function with MSW/VC6,
|
||||||
// you cannot use the iODBC headers, you must use the VC headers,
|
// you cannot use the iODBC headers, you must use the VC headers,
|
||||||
// plus the odbcinst.h header - gt Nov 2 2000
|
// plus the odbcinst.h header - gt Nov 2 2000
|
||||||
//
|
//
|
||||||
// Must add "odbccp32.lib" in \wx2\wxWindows\src\makevc.env to the WINLIBS= line
|
// Must add "odbccp32.lib" in \wx2\wxWindows\src\makevc.env to the WINLIBS= line
|
||||||
//
|
//
|
||||||
#include "sql.h"
|
#include "sql.h"
|
||||||
#include "sqlext.h"
|
#include "sqlext.h"
|
||||||
#include "odbcinst.h"
|
#include "odbcinst.h"
|
||||||
#elif defined( __VMS )
|
#elif defined( __VMS )
|
||||||
// For OpenVMS use the ones from the library
|
// For OpenVMS use the ones from the library
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <isql.h>
|
#include <isql.h>
|
||||||
#include <isqlext.h>
|
#include <isqlext.h>
|
||||||
}
|
}
|
||||||
#else
|
#else // !__VISUALC__, !__VMS
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "wx/isql.h"
|
#include "wx/isql.h"
|
||||||
#include "wx/isqlext.h"
|
#include "wx/isqlext.h"
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -772,10 +771,11 @@ bool WXDLLEXPORT FreeDbConnection(wxDB *pDb);
|
|||||||
void WXDLLEXPORT CloseDbConnections(void);
|
void WXDLLEXPORT CloseDbConnections(void);
|
||||||
int WXDLLEXPORT NumberDbConnectionsInUse(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,
|
bool WXDLLEXPORT GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDescMax,
|
||||||
UWORD direction = SQL_FETCH_NEXT);
|
UWORD direction = SQL_FETCH_NEXT);
|
||||||
#endif // Deprecated structures/classes/functions
|
#endif // Deprecated structures/classes/functions
|
||||||
|
|
||||||
#endif
|
#endif // _WX_DB_H_
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user