odbcinst.h   odbcinst.h 
skipping to change at line 15 skipping to change at line 15
* This code was created by Peter Harvey @ CodeByDesign. * This code was created by Peter Harvey @ CodeByDesign.
* Released under LGPL 28.JAN.99 * Released under LGPL 28.JAN.99
* *
* Contributions from... * Contributions from...
* ----------------------------------------------- * -----------------------------------------------
* Peter Harvey - pharvey@codebydesign.com * Peter Harvey - pharvey@codebydesign.com
**************************************************/ **************************************************/
#ifndef __ODBCINST_H #ifndef __ODBCINST_H
#define __ODBCINST_H #define __ODBCINST_H
#include <stdio.h>
#ifndef BOOL #ifndef BOOL
#define BOOL int #define BOOL int
#endif #endif
#ifndef __SQL #ifndef __SQL
#include "sql.h" #include "sql.h"
#endif #endif
/******************************************************** /*!
* WINDOW HANDLE * \brief Our generic window handle.
* Create and init one of these before calling a function which requires *
* a HWND. Then pass this as HWND arg with a cast. * This is used wherever a HWND is needed. The caller inits this according
* The unixODBC function will use the szGUI to look for a GUI plugin lib. * to which UI the caller has (or simply desires). This may be a; console,
********************************************************/ xlib, qt3, qt4,
* gtk, mono, carbon, etc.
*
* SQLCreateDataSource
* (maps to ODBCCreateDataSource entry point in UI plugin)
*
* This function requires a HWND (and it must NOT be NULL as per ODBC
spec.). So
* the caller should *always* init an ODBCINSTWND and cast it to HWND
as it is passed to
* SQLCreateDataSource.
*
* SQLManageDataSources
* (maps to ODBCManageDataSources entry point in UI plugin)
*
* This function requires a HWND (and it must NOT be NULL as per ODBC
spec.). So
* the caller should *always* init an ODBCINSTWND and cast it to HWND
as it is passed to
* SQLManageDataSources. However; it may make sense to have a NULL hWn
d... this is what
* an ODBC Administrator program would typically do.
*
* Plugin Selection
*
* 1. Passing a NULL to a function instead of a valid HODBCINSTWND may
result in an error
* (this is the case with SQLCreateDataSource). In anycase; passing a
NULL in this way
* negates the use of any UI plugin.
*
* 2. szUI has a value and it is the file name (no path and no extensi
on) of the UI
* plugin. The plugin is loaded and the appropriate function is called
with hWnd. The
* caller must have init hWnd in a manner which is appropriate for the
UI plugin.
*
* 3. Passing an empty szUI indicates that the UI plugin should be det
ermined by other
* means (see 4). In such a case it is dangerous to use hWnd because i
t may not match
* the type expected by the plugin. hWnd will be ignored and a NULL wi
ll be passed to the UI
* plugin.
*
* 4. The fallback logic for determining the UI plugin is as follows;
* - use the ODBCINSTUI environment variable to get the UI plugin
file name
* - use the ODBCINSTUI value in odbcinst.ini to get the UI plugin
file name
*
* NOTE: In the future we may want to consider making HWND of this type
instead of having
* two different types and having to cast HODBCINSTWND into a HWND
.
*/
typedef struct tODBCINSTWND typedef struct tODBCINSTWND
{ {
char szGUI[21]; /* SHORT NAME FOR GUI; char szUI[FILENAME_MAX]; /*!< Plugin file name (no path and no exten
Qt, GTK, X, CONSOLE (case insensitive) */ sion) ie "odbcinstQ4". */
HWND hWnd; /* WINDOW HANDLE (i.e. HWND hWnd; /*!< this is passed to the UI plugin - call
pointer to a QWidget for Qt) */ er must know what the plugin is expecting */
} ODBCINSTWND, *HODBCINSTWND; } ODBCINSTWND, *HODBCINSTWND;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifndef ODBCVER #ifndef ODBCVER
#define ODBCVER 0x0351 #define ODBCVER 0x0351
#endif #endif
skipping to change at line 109 skipping to change at line 149
#define ODBC_ERROR_WRITING_SYSINFO_FAILED 19 #define ODBC_ERROR_WRITING_SYSINFO_FAILED 19
#define ODBC_ERROR_REMOVE_DSN_FAILED 20 #define ODBC_ERROR_REMOVE_DSN_FAILED 20
#define ODBC_ERROR_OUT_OF_MEM 21 #define ODBC_ERROR_OUT_OF_MEM 21
#define ODBC_ERROR_OUTPUT_STRING_TRUNCATED 22 #define ODBC_ERROR_OUTPUT_STRING_TRUNCATED 22
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
#ifndef EXPORT #ifndef EXPORT
#define EXPORT #define EXPORT
#endif #endif
#ifdef __OS2__
#define INSTAPI _System
#else
#define INSTAPI #define INSTAPI
#endif
/* HIGH LEVEL CALLS */ /* HIGH LEVEL CALLS */
BOOL INSTAPI SQLInstallODBC (HWND hwndParent, BOOL INSTAPI SQLInstallODBC (HWND hwndParent,
LPCSTR lpszInfFile, LPCSTR lpszInfFile,
LP CSTR lpszSrcPath, LP CSTR lpszSrcPath,
LP CSTR lpszDrivers); LP CSTR lpszDrivers);
BOOL INSTAPI SQLManageDataSources (HWND hwndParent); BOOL INSTAPI SQLManageDataSources (HWND hwndParent);
BOOL INSTAPI SQLCreateDataSource (HWND hwndParent, BOOL INSTAPI SQLCreateDataSource (HWND hwndParent,
LPCSTR lpszDSN); LPCSTR lpszDSN);
BOOL INSTAPI SQLGetTranslator (HWND hwnd, BOOL INSTAPI SQLGetTranslator (HWND hwnd,
skipping to change at line 246 skipping to change at line 290
#if (ODBCVER >= 0x0250) #if (ODBCVER >= 0x0250)
BOOL INSTAPI ConfigDriver(HWND hwndParent, BOOL INSTAPI ConfigDriver(HWND hwndParent,
WORD fRequest, WORD fRequest,
LPCSTR lpszDriver, LPCSTR lpszDriver,
LPCSTR lpszArgs, LPCSTR lpszArgs,
LPSTR lpszMsg, LPSTR lpszMsg,
WORD cbMsgMax, WORD cbMsgMax,
WORD *pcbMsgOut); WORD *pcbMsgOut);
#endif #endif
/*
* UNICODE APIs
*/
BOOL INSTAPI SQLInstallODBCW (HWND hwndParent,
LPCWSTR lpszInfFile,
LP
CWSTR lpszSrcPath,
LP
CWSTR lpszDrivers);
BOOL INSTAPI SQLCreateDataSourceW (HWND hwndParent,
LPCWSTR lpszDSN);
BOOL INSTAPI SQLGetTranslatorW (HWND hwnd,
LPWSTR lpszName,
WORD cbNameMax,
WORD *pcbNameOut,
LPWSTR lpszPath,
WORD cbPathMax,
WORD *pcbPathOut,
DWORD *pvOption);
BOOL INSTAPI SQLInstallDriverW (LPCWSTR lpszInfFile,
LPCWSTR lpszDriver,
LPWSTR lpszPath,
WORD cbPathMax,
WORD * pcbPathOut);
BOOL INSTAPI SQLInstallDriverManagerW (LPWSTR lpszPath,
WORD cbPathMax,
WORD * pcbPathOut);
BOOL INSTAPI SQLGetInstalledDriversW (LPWSTR lpszBuf,
WORD cbBufMax,
WORD * pcbBufOut);
BOOL INSTAPI SQLGetAvailableDriversW (LPCWSTR lpszInfFile,
LPWSTR lpszBuf,
WORD cbBufMax,
WORD * pcbBufOut);
BOOL INSTAPI SQLConfigDataSourceW (HWND hwndParent,
WORD fRequest,
LPCWSTR lpszDriver,
LPCWSTR lpszAttributes);
BOOL INSTAPI SQLWriteDSNToIniW (LPCWSTR lpszDSN,
LPCWSTR lpszDriver);
BOOL INSTAPI SQLRemoveDSNFromIniW (LPCWSTR lpszDSN);
BOOL INSTAPI SQLValidDSNW (LPCWSTR lpszDSN);
BOOL INSTAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection,
LPCWSTR lpszEntry,
LPCWSTR lpszString,
LPCWSTR lpszFilename);
int INSTAPI SQLGetPrivateProfileStringW( LPCWSTR lpszSection,
LPCWSTR lpszEntry,
LPCWSTR lpszDefault,
LPWSTR lpszRetBuffer,
int cbRetBuffer,
LPCWSTR lpszFilename);
#if (ODBCVER >= 0x0250)
BOOL INSTAPI SQLInstallTranslatorW(LPCWSTR lpszInfFile,
LPCWSTR lpszTranslator,
LPCWSTR lpszPathIn,
LPWSTR lpszPathOut,
WORD cbPathOutMax,
WORD *pcbPathOut,
WORD fRequest,
LPDWORD lpdwUsageCount);
BOOL INSTAPI SQLRemoveTranslatorW(LPCWSTR lpszTranslator,
LPDWORD lpdwUsageCount);
BOOL INSTAPI SQLRemoveDriverW(LPCWSTR lpszDriver,
BOOL fRemoveDSN,
LPDWORD lpdwUsageCount);
BOOL INSTAPI SQLConfigDriverW(HWND hwndParent,
WORD fRequest,
LPCWSTR lpszDriver,
LPCWSTR lpszArgs,
LPWSTR lpszMsg,
WORD cbMsgMax,
WORD *pcbMsgOut);
#endif
#if (ODBCVER >= 0x0300)
SQLRETURN INSTAPI SQLInstallerErrorW(WORD iError,
DWORD *pfErrorCode,
LPWSTR lpszErrorMsg,
WORD cbErrorMsgMax,
WORD *pcbErrorMsg);
SQLRETURN INSTAPI SQLPostInstallerErrorW(DWORD dwErrorCode,
LPCWSTR lpszErrorMsg);
BOOL INSTAPI SQLWriteFileDSNW(LPCWSTR lpszFileName,
LPCWSTR lpszAppName,
LPCWSTR lpszKeyName,
LPCWSTR lpszString);
BOOL INSTAPI SQLReadFileDSNW(LPCWSTR lpszFileName,
LPCWSTR lpszAppName,
LPCWSTR lpszKeyName,
LPWSTR lpszString,
WORD cbString,
WORD *pcbString);
BOOL INSTAPI SQLInstallDriverExW(LPCWSTR lpszDriver,
LPCWSTR lpszPathIn,
LPWSTR lpszPathOut,
WORD cbPathOutMax,
WORD *pcbPathOut,
WORD fRequest,
LPDWORD lpdwUsageCount);
BOOL INSTAPI SQLInstallTranslatorExW(LPCWSTR lpszTranslator,
LPCWSTR lpszPathIn,
LPWSTR lpszPathOut,
WORD cbPathOutMax,
WORD *pcbPathOut,
WORD fRequest,
LPDWORD lpdwUsageCount);
#endif /* ODBCVER >= 0x0300 */
/* Driver specific Setup APIs called by installer */
BOOL INSTAPI ConfigDSNW (HWND hwndParent,
WORD fRequest,
LPCWSTR lpszDriver,
LPCWSTR lpszAttributes);
#if (ODBCVER >= 0x0250)
BOOL INSTAPI ConfigDriverW(HWND hwndParent,
WORD fRequest,
LPCWSTR lpszDriver,
LPCWSTR lpszArgs,
LPWSTR lpszMsg,
WORD cbMsgMax,
WORD *pcbMsgOut);
#endif
#ifndef SQL_NOUNICODEMAP /* define this to disable the mapping */
#ifdef UNICODE
#define SQLInstallODBC SQLInstallODBCW
#define SQLCreateDataSource SQLCreateDataSourceW
#define SQLGetTranslator SQLGetTranslatorW
#define SQLInstallDriver SQLInstallDriverW
#define SQLInstallDriverManager SQLInstallDriverManagerW
#define SQLGetInstalledDrivers SQLGetInstalledDriversW
#define SQLGetAvailableDrivers SQLGetAvailableDriversW
#define SQLConfigDataSource SQLConfigDataSourceW
#define SQLWriteDSNToIni SQLWriteDSNToIniW
#define SQLRemoveDSNFromIni SQLRemoveDSNFromIniW
#define SQLValidDSN SQLValidDSNW
#define SQLWritePrivateProfileString SQLWritePrivateProfileStringW
#define SQLGetPrivateProfileString SQLGetPrivateProfileStringW
#define SQLInstallTranslator SQLInstallTranslatorW
#define SQLRemoveTranslator SQLRemoveTranslatorW
#define SQLRemoveDriver SQLRemoveDriverW
#define SQLConfigDriver SQLConfigDriverW
#define SQLInstallerError SQLInstallerErrorW
#define SQLPostInstallerError SQLPostInstallerErrorW
#define SQLReadFileDSN SQLReadFileDSNW
#define SQLWriteFileDSN SQLWriteFileDSNW
#define SQLInstallDriverEx SQLInstallDriverExW
#define SQLInstallTranslatorEx SQLInstallTranslatorExW
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 6 change blocks. 
10 lines changed or deleted 235 lines changed or added


 odbcinstext.h   odbcinstext.h 
skipping to change at line 15 skipping to change at line 15
* This code was created by Peter Harvey @ CodeByDesign. * This code was created by Peter Harvey @ CodeByDesign.
* Released under LGPL 28.JAN.99 * Released under LGPL 28.JAN.99
* *
* Contributions from... * Contributions from...
* ----------------------------------------------- * -----------------------------------------------
* Peter Harvey - pharvey@codebydesign.com * Peter Harvey - pharvey@codebydesign.com
**************************************************/ **************************************************/
#ifndef _ODBCINST_H #ifndef _ODBCINST_H
#define _ODBCINST_H #define _ODBCINST_H
#ifdef UNIXODBC_SOURCE
#include <ltdl.h> #include <ltdl.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif
#ifdef HAVE_PWD_H
#include <pwd.h> #include <pwd.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif
#include <stdio.h> #include <stdio.h>
#define ODBCVER 0x0351 #ifndef ODBCVER
#define ODBCVER 0x0380
#endif
#include <ini.h> #include <ini.h>
#include <log.h> #include <log.h>
#include <odbcinst.h> #include <odbcinst.h>
/******************************************************** /********************************************************
* CONSTANTS WHICH DO NOT EXIST ELSEWHERE * CONSTANTS WHICH DO NOT EXIST ELSEWHERE
********************************************************/ ********************************************************/
#ifndef TRUE #ifndef TRUE
#define FALSE 0; #define FALSE 0;
#define TRUE 1; #define TRUE 1;
#endif #endif
#else /* not UNIXODBC_SOURCE */
/********************************************************
* outside the unixODBC source tree only the *
* public interface is exposed *
********************************************************/
#include <odbcinst.h>
/********************************************************
* these limits are originally defined in ini.h *
* but are needed to implement ODBCINSTGetProperties *
* for the Driver Setup *
********************************************************/
#define INI_MAX_LINE 1000
#define INI_MAX_OBJECT_NAME INI_MAX_LINE
#define INI_MAX_PROPERTY_NAME INI_MAX_LINE
#define INI_MAX_PROPERTY_VALUE INI_MAX_LINE
#endif /* UNIXODBC_SOURCE */
/******************************************************** /********************************************************
* PUBLIC API * PUBLIC API
********************************************************/ ********************************************************/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
BOOL SQLConfigDataSource( HWND hWnd, BOOL INSTAPI SQLConfigDataSource( HWND hWnd,
WORD nReq uest, WORD nReq uest,
LPCSTR pszD river, LPCSTR pszD river,
LPCSTR pszA ttributes ); LPCSTR pszA ttributes );
BOOL SQLGetConfigMode( UWORD *pnConfigMode ); BOOL INSTAPI SQLGetConfigMode( UWORD *pnConfigMode );
BOOL SQLGetInstalledDrivers( LPSTR pszBuf, BOOL INSTAPI SQLGetInstalledDrivers( LPSTR pszBuf,
WORD nBuf Max, WORD nBuf Max,
WORD *pnB ufOut ); WORD *pnB ufOut );
BOOL SQLInstallDriverEx( LPCSTR pszDriver, BOOL INSTAPI SQLInstallDriverEx( LPCSTR pszDriver,
LPCSTR pszP athIn, LPCSTR pszP athIn,
LPSTR pszP athOut, LPSTR pszP athOut,
WORD nPat hOutMax, WORD nPat hOutMax,
WORD *nPa thOut, WORD *nPa thOut,
WORD nReq uest, WORD nReq uest,
LPDWORD pnUs ageCount ); LPDWORD pnUs ageCount );
BOOL SQLInstallDriverManager( LPSTR pszPath, BOOL INSTAPI SQLInstallDriverManager( LPSTR pszPath,
WORD nPat hMax, WORD nPat hMax,
WORD *pnP athOut ); WORD *pnP athOut );
RETCODE SQLInstallerError( WORD nError, RETCODE INSTAPI SQLInstallerError( WORD nError,
DWORD *pnE rrorCode, DWORD *pnE rrorCode,
LPSTR pszE rrorMsg, LPSTR pszE rrorMsg,
WORD nErr orMsgMax, WORD nErr orMsgMax,
WORD *nEr rorMsg ); WORD *nEr rorMsg );
BOOL SQLManageDataSources( HWND hWnd ); BOOL INSTAPI SQLManageDataSources( HWND hWnd );
BOOL SQLReadFileDSN( LPCSTR pszFileName, BOOL INSTAPI SQLReadFileDSN( LPCSTR pszFileName,
LPCSTR pszA ppName, LPCSTR pszA ppName,
LPCSTR pszK eyName, LPCSTR pszK eyName,
LPSTR pszS tring, LPSTR pszS tring,
WORD nStr ing, WORD nStr ing,
WORD *pnS tring ); WORD *pnS tring );
BOOL SQLRemoveDriver( LPCSTR pszDriver, BOOL INSTAPI SQLRemoveDriver( LPCSTR pszDriver,
BOOL nRem oveDSN, BOOL nRem oveDSN,
LPDWORD pnUs ageCount ); LPDWORD pnUs ageCount );
BOOL SQLRemoveDriverManager( LPDWORD pnUsageCount ); BOOL INSTAPI SQLRemoveDriverManager( LPDWORD pnUsageCount );
BOOL SQLRemoveDSNFromIni( LPCSTR pszDSN ); BOOL INSTAPI SQLRemoveDSNFromIni( LPCSTR pszDSN );
BOOL SQLRemoveTranslator( LPCSTR pszTranslator, BOOL INSTAPI SQLRemoveTranslator( LPCSTR pszTranslator,
LPDWORD pnUs ageCount ); LPDWORD pnUs ageCount );
BOOL SQLSetConfigMode( UWORD nConfigMode ); BOOL INSTAPI SQLSetConfigMode( UWORD nConfigMode );
BOOL SQLValidDSN( LPCSTR pszDSN ); BOOL INSTAPI SQLValidDSN( LPCSTR pszDSN );
BOOL SQLWriteDSNToIni( LPCSTR pszDSN, BOOL INSTAPI SQLWriteDSNToIni( LPCSTR pszDSN,
LPCSTR pszD river ); LPCSTR pszD river );
BOOL SQLWriteFileDSN( LPCSTR pszFileName, BOOL INSTAPI SQLWriteFileDSN( LPCSTR pszFileName,
LPCSTR pszA ppName, LPCSTR pszA ppName,
LPCSTR pszK eyName, LPCSTR pszK eyName,
LPCSTR pszS tring ); LPCSTR pszS tring );
BOOL SQLWritePrivateProfileString( BOOL INSTAPI SQLWritePrivateProfileString(
LPCSTR pszS ection, LPCSTR pszS ection,
LPCSTR pszE ntry, LPCSTR pszE ntry,
LPCSTR pszS tring, LPCSTR pszS tring,
LPCSTR pszF ileName ); LPCSTR pszF ileName );
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#ifdef UNIXODBC_SOURCE
/******************************************************** /********************************************************
* PRIVATE API * PRIVATE API
********************************************************/ ********************************************************/
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
BOOL _odbcinst_UserINI( BOOL _odbcinst_UserINI(
char *pszFileName, char *pszFileName,
BOOL bVerify ); BOOL bVerify );
BOOL _odbcinst_SystemINI( BOOL _odbcinst_SystemINI(
char *pszFileName, char *pszFileName,
BOOL bVerify ); BOOL bVerify );
char * odbcinst_system_file_path( void ); BOOL _odbcinst_FileINI( char *pszPath );
char * INSTAPI odbcinst_system_file_path( char *buffer );
char * INSTAPI odbcinst_system_file_name( char *buffer );
char * INSTAPI odbcinst_user_file_path( char *buffer );
char * INSTAPI odbcinst_user_file_name( char *buffer );
BOOL _odbcinst_ConfigModeINI( BOOL _odbcinst_ConfigModeINI(
char *pszFileName ); char *pszFileName );
int _odbcinst_GetSections( int _odbcinst_GetSections(
HINI hIni, HINI hIni,
LPSTR pRetBuffer, LPSTR pRetBuffer,
int nRetBuffer, int nRetBuffer,
int *pnBufPos ); int *pnBufPos );
skipping to change at line 153 skipping to change at line 192
LPCSTR pszSection, LPCSTR pszSection,
LPSTR pRetBuffer, LPSTR pRetBuffer,
int nRetBuffer, int nRetBuffer,
int *pnBufPos ); int *pnBufPos );
int _SQLGetInstalledDrivers( int _SQLGetInstalledDrivers(
LPCSTR pszSection, LPCSTR pszSection,
LPCSTR pszEntry, LPCSTR pszEntry,
LPCSTR pszDefault, LPCSTR pszDefault,
LPCSTR pRetBuffer, LPCSTR pRetBuffer,
int nRetBuffer ); int nRetBuffer );
BOOL _SQLWriteInstalledDrivers( BOOL _SQLWriteInstalledDrivers(
LPCSTR pszSection, LPCSTR pszSection,
LPCSTR pszEntry, LPCSTR pszEntry,
LPCSTR pszString ); LPCSTR pszString );
BOOL _SQLDriverConnectPrompt(
HWND hwnd,
SQLCHAR *dsn,
SQLSMALLINT len_dsn );
void __set_config_mode( int mode );
int __get_config_mode( void );
int inst_logPushMsg( int inst_logPushMsg(
char *pszModule, char *pszModule,
char *pszFunctionName, char *pszFunctionName,
int nLine, int nLine,
int nSeverity, int nSeverity,
int nCode, int nCode,
char *pszMessage ); char *pszMessage );
int inst_logPopMsg( int inst_logPeekMsg( long nMsg, HLOGMSG *phMsg );
char *pszMsgHdr, int inst_logClear();
int *pnCode,
char *pszMsg );
/* /*
* we should look at caching this info, the calls can become expensive * we should look at caching this info, the calls can become expensive
*/ */
#ifndef DISABLE_INI_CACHING #ifndef DISABLE_INI_CACHING
struct ini_cache struct ini_cache
{ {
char *fname; char *fname;
skipping to change at line 199 skipping to change at line 244
long timestamp; long timestamp;
struct ini_cache *next; struct ini_cache *next;
}; };
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* UNIXODBC_SOURCE */
/********************************* /*********************************
* ODBCINST - PROPERTIES * ODBCINST - PROPERTIES
********************************* *********************************
* *
* PURPOSE: * PURPOSE:
* *
* To provide the caller a mechanism to interact with Data Source propertie s * To provide the caller a mechanism to interact with Data Source propertie s
* containing Driver specific options while avoiding embedding GUI code in * containing Driver specific options while avoiding embedding GUI code in
* the ODBC infrastructure. * the ODBC infrastructure.
* *
skipping to change at line 251 skipping to change at line 298
#define ODBCINST_SUCCESS 0 #define ODBCINST_SUCCESS 0
#define ODBCINST_WARNING 1 #define ODBCINST_WARNING 1
#define ODBCINST_ERROR 2 #define ODBCINST_ERROR 2
#define ODBCINST_PROMPTTYPE_LABEL 0 /* readonly */ #define ODBCINST_PROMPTTYPE_LABEL 0 /* readonly */
#define ODBCINST_PROMPTTYPE_TEXTEDIT 1 #define ODBCINST_PROMPTTYPE_TEXTEDIT 1
#define ODBCINST_PROMPTTYPE_LISTBOX 2 #define ODBCINST_PROMPTTYPE_LISTBOX 2
#define ODBCINST_PROMPTTYPE_COMBOBOX 3 #define ODBCINST_PROMPTTYPE_COMBOBOX 3
#define ODBCINST_PROMPTTYPE_FILENAME 4 #define ODBCINST_PROMPTTYPE_FILENAME 4
#define ODBCINST_PROMPTTYPE_HIDDEN 5 #define ODBCINST_PROMPTTYPE_HIDDEN 5
#define ODBCINST_PROMPTTYPE_TEXTEDIT_PASSWORD 6
typedef struct tODBCINSTPROPERTY typedef struct tODBCINSTPROPERTY
{ {
struct tODBCINSTPROPERTY *pNext; /* p ointer to next property, NULL if last property */ struct tODBCINSTPROPERTY *pNext; /* p ointer to next property, NULL if last property */
char szName[INI_MAX_PROPERTY_NAME+1]; /* property name */ char szName[INI_MAX_PROPERTY_NAME+1]; /* property name */
char szValue[INI_MAX_PROPERTY_VALUE+1]; /* property value */ char szValue[INI_MAX_PROPERTY_VALUE+1]; /* property value */
int nPromptType; /* PROMPTTYPE_TEXTEDIT, PROMPTTYPE_LISTBOX, PROMPTTYPE_COMBOBOX , PROMPTTYPE_FILENAME */ int nPromptType; /* PROMPTTYPE_TEXTEDIT, PROMPTTYPE_LISTBOX, PROMPTTYPE_COMBOBOX , PROMPTTYPE_FILENAME */
char **aPromptData; /* array of pointers terminated with a NULL value in array. */ char **aPromptData; /* array of pointers terminated with a NULL value in array. */
char *pszHelp; /* help on this property (driver setups should keep it short) */ char *pszHelp; /* help on this property (driver setups should keep it short) */
void *pWidget; /* CALLER CAN STORE A POINTER TO ? HERE */ void *pWidget; /* CALLER CAN STORE A POINTER TO ? HERE */
int bRefresh; /* app should refresh widget ie Driver Setup has change d aPromptData or szValue */ int bRefresh; /* app should refresh widget ie Driver Setup has change d aPromptData or szValue */
void *hDLL; /* for odbcinst internal use... only first property has valid o ne */ void *hDLL; /* for odbcinst internal use... only first property has valid o ne */
} ODBCINSTPROPERTY, *HODBCINSTPROPERTY; } ODBCINSTPROPERTY, *HODBCINSTPROPERTY;
/*
* Conversion routines for wide interface
*/
char* _multi_string_alloc_and_copy( LPCWSTR in );
char* _single_string_alloc_and_copy( LPCWSTR in );
void _single_string_copy_to_wide( SQLWCHAR *out, LPCSTR in, int len );
void _multi_string_copy_to_wide( SQLWCHAR *out, LPCSTR in, int len );
void _single_copy_to_wide( SQLWCHAR *out, LPCSTR in, int len );
SQLWCHAR* _multi_string_alloc_and_expand( LPCSTR in );
SQLWCHAR* _single_string_alloc_and_expand( LPCSTR in );
void _single_copy_from_wide( SQLCHAR *out, LPCWSTR in, int len );
/*
* To support finding UI plugin
*/
char *_getUIPluginName( char *pszName, char *pszUI );
char *_appendUIPluginExtension( char *pszNameAndExtension, char *pszName );
char *_prependUIPluginPath( char *pszPathAndName, char *pszName );
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
/* ONLY IMPLEMENTED IN ODBCINST (not in Driver Setup) */ /* ONLY IMPLEMENTED IN ODBCINST (not in Driver Setup) */
int ODBCINSTConstructProperties( char *szDriver, HODBCINSTPROPERTY *hFirstP int INSTAPI ODBCINSTConstructProperties( char *szDriver, HODBCINSTPROPERTY
roperty ); *hFirstProperty );
int ODBCINSTSetProperty( HODBCINSTPROPERTY hFirstProperty, char *pszPropert int INSTAPI ODBCINSTSetProperty( HODBCINSTPROPERTY hFirstProperty, char *ps
y, char *pszValue ); zProperty, char *pszValue );
int ODBCINSTDestructProperties( HODBCINSTPROPERTY *hFirstProperty ); int INSTAPI ODBCINSTDestructProperties( HODBCINSTPROPERTY *hFirstProperty )
int ODBCINSTAddProperty( HODBCINSTPROPERTY hFirstProperty, char *pszPropert ;
y, char *pszValue ); int INSTAPI ODBCINSTAddProperty( HODBCINSTPROPERTY hFirstProperty, char *ps
zProperty, char *pszValue );
/* IMPLEMENTED IN ODBCINST AND DRIVER SETUP */ /* IMPLEMENTED IN ODBCINST AND DRIVER SETUP */
int ODBCINSTValidateProperty( HODBCINSTPROPERTY hFirstProperty, char *pszPr int INSTAPI ODBCINSTValidateProperty( HODBCINSTPROPERTY hFirstProperty, cha
operty, char *pszMessage ); r *pszProperty, char *pszMessage );
int ODBCINSTValidateProperties( HODBCINSTPROPERTY hFirstProperty, HODBCINST int INSTAPI ODBCINSTValidateProperties( HODBCINSTPROPERTY hFirstProperty, H
PROPERTY hBadProperty, char *pszMessage ); ODBCINSTPROPERTY hBadProperty, char *pszMessage );
/* ONLY IMPLEMENTED IN DRIVER SETUP (not in ODBCINST) */ /* ONLY IMPLEMENTED IN DRIVER SETUP (not in ODBCINST) */
int ODBCINSTGetProperties( HODBCINSTPROPERTY hFirstProperty ); int INSTAPI ODBCINSTGetProperties( HODBCINSTPROPERTY hFirstProperty );
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif
#endif #endif
 End of changes. 35 change blocks. 
36 lines changed or deleted 105 lines changed or added


 sql.h   sql.h 
skipping to change at line 14 skipping to change at line 14
* These should be consistent with the MS version. * These should be consistent with the MS version.
* *
**************************************************/ **************************************************/
#ifndef __SQL_H #ifndef __SQL_H
#define __SQL_H #define __SQL_H
/**************************** /****************************
* default to 3.51 declare something else before here and you get a whole n ew ball of wax * default to 3.51 declare something else before here and you get a whole n ew ball of wax
***************************/ ***************************/
#ifndef ODBCVER #ifndef ODBCVER
#define ODBCVER 0x0351 #define ODBCVER 0x0380
#endif #endif
#ifndef __SQLTYPES_H
#include "sqltypes.h" #include "sqltypes.h"
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/**************************** /****************************
* some ret values * some ret values
***************************/ ***************************/
#define SQL_NULL_DATA (-1) #define SQL_NULL_DATA (-1)
#define SQL_DATA_AT_EXEC (-2) #define SQL_DATA_AT_EXEC (-2)
skipping to change at line 273 skipping to change at line 275
/* SQLEndTran() options */ /* SQLEndTran() options */
#define SQL_COMMIT 0 #define SQL_COMMIT 0
#define SQL_ROLLBACK 1 #define SQL_ROLLBACK 1
/* null handles returned by SQLAllocHandle() */ /* null handles returned by SQLAllocHandle() */
#define SQL_NULL_HENV 0 #define SQL_NULL_HENV 0
#define SQL_NULL_HDBC 0 #define SQL_NULL_HDBC 0
#define SQL_NULL_HSTMT 0 #define SQL_NULL_HSTMT 0
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
#define SQL_NULL_HDESC 0 #define SQL_NULL_HDESC 0
#define SQL_NULL_DESC 0
#endif #endif
/* null handle used in place of parent handle when allocating HENV */ /* null handle used in place of parent handle when allocating HENV */
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
#define SQL_NULL_HANDLE 0L #define SQL_NULL_HANDLE 0L
#endif #endif
/* Values that may appear in the result set of SQLSpecialColumns() */ /* Values that may appear in the result set of SQLSpecialColumns() */
#define SQL_SCOPE_CURROW 0 #define SQL_SCOPE_CURROW 0
#define SQL_SCOPE_TRANSACTION 1 #define SQL_SCOPE_TRANSACTION 1
skipping to change at line 390 skipping to change at line 393
#define SQL_API_SQLSETPARAM 22 #define SQL_API_SQLSETPARAM 22
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
#define SQL_API_SQLSETSTMTATTR 1020 #define SQL_API_SQLSETSTMTATTR 1020
#endif #endif
#define SQL_API_SQLSETSTMTOPTION 51 #define SQL_API_SQLSETSTMTOPTION 51
#define SQL_API_SQLSPECIALCOLUMNS 52 #define SQL_API_SQLSPECIALCOLUMNS 52
#define SQL_API_SQLSTATISTICS 53 #define SQL_API_SQLSTATISTICS 53
#define SQL_API_SQLTABLES 54 #define SQL_API_SQLTABLES 54
#define SQL_API_SQLTRANSACT 23 #define SQL_API_SQLTRANSACT 23
#if (ODBCVER >= 0x0380)
#define SQL_API_SQLCANCELHANDLE 1022
#endif
/* Information requested by SQLGetInfo() */ /* Information requested by SQLGetInfo() */
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
#define SQL_MAX_DRIVER_CONNECTIONS 0 #define SQL_MAX_DRIVER_CONNECTIONS 0
#define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS #define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS
#define SQL_MAX_CONCURRENT_ACTIVITIES 1 #define SQL_MAX_CONCURRENT_ACTIVITIES 1
#define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIE S #define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIE S
#endif #endif
#define SQL_DATA_SOURCE_NAME 2 #define SQL_DATA_SOURCE_NAME 2
#define SQL_FETCH_DIRECTION 8 #define SQL_FETCH_DIRECTION 8
#define SQL_SERVER_NAME 13 #define SQL_SERVER_NAME 13
skipping to change at line 563 skipping to change at line 570
#define SQL_TRANSACTION_READ_COMMITTED SQL_TXN_READ_COMMITTED #define SQL_TRANSACTION_READ_COMMITTED SQL_TXN_READ_COMMITTED
#define SQL_TXN_REPEATABLE_READ 0x00000004L #define SQL_TXN_REPEATABLE_READ 0x00000004L
#define SQL_TRANSACTION_REPEATABLE_READ SQL_TXN_REPEATABLE_R EAD #define SQL_TRANSACTION_REPEATABLE_READ SQL_TXN_REPEATABLE_R EAD
#define SQL_TXN_SERIALIZABLE 0x00000008L #define SQL_TXN_SERIALIZABLE 0x00000008L
#define SQL_TRANSACTION_SERIALIZABLE SQL_TXN_SERIALIZABLE #define SQL_TRANSACTION_SERIALIZABLE SQL_TXN_SERIALIZABLE
/* SQL_NULL_COLLATION values */ /* SQL_NULL_COLLATION values */
#define SQL_NC_HIGH 0 #define SQL_NC_HIGH 0
#define SQL_NC_LOW 1 #define SQL_NC_LOW 1
SQLRETURN SQLAllocConnect(SQLHENV EnvironmentHandle, SQLRETURN SQL_API SQLAllocConnect(SQLHENV EnvironmentHandle,
SQLHDBC *ConnectionHandle); SQLHDBC *ConnectionHandle);
SQLRETURN SQLAllocEnv(SQLHENV *EnvironmentHandle); SQLRETURN SQL_API SQLAllocEnv(SQLHENV *EnvironmentHandle);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLAllocHandle(SQLSMALLINT HandleType, SQLRETURN SQL_API SQLAllocHandle(SQLSMALLINT HandleType,
SQLHANDLE InputHandle, SQLHANDLE *OutputHandle); SQLHANDLE InputHandle, SQLHANDLE *Out
putHandle);
#endif #endif
SQLRETURN SQLAllocStmt(SQLHDBC ConnectionHandle, SQLRETURN SQL_API SQLAllocStmt(SQLHDBC ConnectionHandle,
SQLHSTMT *StatementHandle); SQLHSTMT *StatementHandle);
SQLRETURN SQLBindCol(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLBindCol(SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLUSMALLINT ColumnNumber, SQLSMALLINT Ta
SQLPOINTER TargetValue, SQLLEN BufferLength, rgetType,
SQLLEN *StrLen_or_Ind); SQLPOINTER TargetValue, SQLLEN BufferLeng
th,
SQLLEN *StrLen_or_Ind);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLBindParam(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLBindParam(SQLHSTMT StatementHandle,
SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType, SQLUSMALLINT ParameterNumber, SQLSMALLI
SQLSMALLINT ParameterType, SQLULEN LengthPrecision, NT ValueType,
SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLSMALLINT ParameterType, SQLULEN Leng
SQLLEN *StrLen_or_Ind); thPrecision,
SQLSMALLINT ParameterScale, SQLPOINTER
ParameterValue,
SQLLEN *StrLen_or_Ind);
#endif #endif
SQLRETURN SQLCancel(SQLHSTMT StatementHandle); SQLRETURN SQL_API SQLCancel(SQLHSTMT StatementHandle);
#if (ODBCVER >= 0x0380)
SQLRETURN SQL_API SQLCancelHandle(SQLSMALLINT HandleType, SQLHANDLE InputH
andle);
#endif
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLCloseCursor(SQLHSTMT StatementHandle); SQLRETURN SQL_API SQLCloseCursor(SQLHSTMT StatementHandle);
SQLRETURN SQL_API SQLColAttribute(SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber, SQLUSMAL
LINT FieldIdentifier,
SQLPOINTER CharacterAttribute, SQLS
MALLINT BufferLength,
SQLSMALLINT *StringLength, SQLLEN *
NumericAttribute
/* spec says (SQLPOINTER) not (SQLEN*) - PAH */ );
/* Ms now say SQLLEN* http://msdn.microsoft.com/library/en-us/odbc/htm/
dasdkodbcoverview_64bit.asp - NG */
SQLRETURN SQLColAttribute (SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier,
SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength,
SQLSMALLINT *StringLength, SQLPOINTER NumericAttribute);
#endif #endif
SQLRETURN SQLColumns(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLColumns(SQLHSTMT StatementHandle,
SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *CatalogName, SQLSMALLINT NameLen
SQLCHAR *SchemaName, SQLSMALLINT NameLength2, gth1,
SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *SchemaName, SQLSMALLINT NameLeng
SQLCHAR *ColumnName, SQLSMALLINT NameLength4); th2,
SQLCHAR *TableName, SQLSMALLINT NameLengt
h3,
SQLCHAR *ColumnName, SQLSMALLINT NameLeng
th4);
SQLRETURN SQLConnect(SQLHDBC ConnectionHandle, SQLRETURN SQL_API SQLConnect(SQLHDBC ConnectionHandle,
SQLCHAR *ServerName, SQLSMALLINT NameLength1, SQLCHAR *ServerName, SQLSMALLINT NameLeng
SQLCHAR *UserName, SQLSMALLINT NameLength2, th1,
SQLCHAR *Authentication, SQLSMALLINT NameLength3); SQLCHAR *UserName, SQLSMALLINT NameLength
2,
SQLCHAR *Authentication, SQLSMALLINT Name
Length3);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLCopyDesc(SQLHDESC SourceDescHandle, SQLRETURN SQL_API SQLCopyDesc(SQLHDESC SourceDescHandle,
SQLHDESC TargetDescHandle); SQLHDESC TargetDescHandle);
#endif #endif
SQLRETURN SQLDataSources(SQLHENV EnvironmentHandle, SQLRETURN SQL_API SQLDataSources(SQLHENV EnvironmentHandle,
SQLUSMALLINT Direction, SQLCHAR *ServerName, SQLUSMALLINT Direction, SQLCHAR *Serv
SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, erName,
SQLCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT BufferLength1, SQLSMALLIN
SQLSMALLINT *NameLength2); T *NameLength1,
SQLCHAR *Description, SQLSMALLINT Buf
ferLength2,
SQLSMALLINT *NameLength2);
SQLRETURN SQLDescribeCol(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLDescribeCol(SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName, SQLUSMALLINT ColumnNumber, SQLCHAR *C
SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, olumnName,
SQLSMALLINT *DataType, SQLULEN *ColumnSize, SQLSMALLINT BufferLength, SQLSMALLINT
SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable); *NameLength,
SQLSMALLINT *DataType, SQLULEN *Colum
nSize,
SQLSMALLINT *DecimalDigits, SQLSMALLI
NT *Nullable);
SQLRETURN SQLDisconnect(SQLHDBC ConnectionHandle); SQLRETURN SQL_API SQLDisconnect(SQLHDBC ConnectionHandle);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLRETURN SQL_API SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle,
SQLSMALLINT CompletionType); SQLSMALLINT CompletionType);
#endif #endif
SQLRETURN SQLError(SQLHENV EnvironmentHandle, SQLRETURN SQL_API SQLError(SQLHENV EnvironmentHandle,
SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle, SQLHDBC ConnectionHandle, SQLHSTMT Statemen
SQLCHAR *Sqlstate, SQLINTEGER *NativeError, tHandle,
SQLCHAR *MessageText, SQLSMALLINT BufferLength, SQLCHAR *Sqlstate, SQLINTEGER *NativeError,
SQLSMALLINT *TextLength); SQLCHAR *MessageText, SQLSMALLINT BufferLen
gth,
SQLSMALLINT *TextLength);
SQLRETURN SQLExecDirect(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLExecDirect(SQLHSTMT StatementHandle,
SQLCHAR *StatementText, SQLINTEGER TextLength); SQLCHAR *StatementText, SQLINTEGER Tex
tLength);
SQLRETURN SQLExecute(SQLHSTMT StatementHandle); SQLRETURN SQL_API SQLExecute(SQLHSTMT StatementHandle);
SQLRETURN SQLFetch(SQLHSTMT StatementHandle); SQLRETURN SQL_API SQLFetch(SQLHSTMT StatementHandle);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLFetchScroll(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLFetchScroll(SQLHSTMT StatementHandle,
SQLSMALLINT FetchOrientation, SQLROWOFFSET FetchOffset); SQLSMALLINT FetchOrientation, SQLLEN
FetchOffset);
#endif #endif
SQLRETURN SQLFreeConnect(SQLHDBC ConnectionHandle); SQLRETURN SQL_API SQLFreeConnect(SQLHDBC ConnectionHandle);
SQLRETURN SQLFreeEnv(SQLHENV EnvironmentHandle); SQLRETURN SQL_API SQLFreeEnv(SQLHENV EnvironmentHandle);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle); SQLRETURN SQL_API SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Hand le);
#endif #endif
SQLRETURN SQLFreeStmt(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLFreeStmt(SQLHSTMT StatementHandle,
SQLUSMALLINT Option); SQLUSMALLINT Option);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLRETURN SQL_API SQLGetConnectAttr(SQLHDBC ConnectionHandle,
SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER Attribute, SQLPOINTER V
SQLINTEGER BufferLength, SQLINTEGER *StringLength); alue,
SQLINTEGER BufferLength, SQLINTEGE
R *StringLength);
#endif #endif
SQLRETURN SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLRETURN SQL_API SQLGetConnectOption(SQLHDBC ConnectionHandle,
SQLUSMALLINT Option, SQLPOINTER Value); SQLUSMALLINT Option, SQLPOINTER
Value);
SQLRETURN SQLGetCursorName(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLGetCursorName(SQLHSTMT StatementHandle,
SQLCHAR *CursorName, SQLSMALLINT BufferLength, SQLCHAR *CursorName, SQLSMALLINT Bu
SQLSMALLINT *NameLength); fferLength,
SQLSMALLINT *NameLength);
SQLRETURN SQLGetData(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLGetData(SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLUSMALLINT ColumnNumber, SQLSMALLINT Ta
SQLPOINTER TargetValue, SQLLEN BufferLength, rgetType,
SQLLEN *StrLen_or_Ind); SQLPOINTER TargetValue, SQLLEN BufferLeng
th,
SQLLEN *StrLen_or_Ind);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLGetDescField(SQLHDESC DescriptorHandle, SQLRETURN SQLGetDescField(SQLHDESC DescriptorHandle,
SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLSMALLINT RecNumber, SQLSMALLINT FieldIde
SQLPOINTER Value, SQLINTEGER BufferLength, ntifier,
SQLINTEGER *StringLength); SQLPOINTER Value, SQLINTEGER BufferLength,
SQLINTEGER *StringLength);
SQLRETURN SQLGetDescRec(SQLHDESC DescriptorHandle, SQLRETURN SQL_API SQLGetDescRec(SQLHDESC DescriptorHandle,
SQLSMALLINT RecNumber, SQLCHAR *Name, SQLSMALLINT RecNumber, SQLCHAR *Name,
SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLSMALLINT BufferLength, SQLSMALLINT
SQLSMALLINT *Type, SQLSMALLINT *SubType, *StringLength,
SQLLEN *Length, SQLSMALLINT *Precision, SQLSMALLINT *Type, SQLSMALLINT *SubTyp
SQLSMALLINT *Scale, SQLSMALLINT *Nullable); e,
SQLLEN *Length, SQLSMALLINT *Precision
,
SQLSMALLINT *Scale, SQLSMALLINT *Nulla
ble);
SQLRETURN SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLRETURN SQL_API SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Ha
SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier, ndle,
SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT RecNumber, SQLSMALLINT D
SQLSMALLINT *StringLength); iagIdentifier,
SQLPOINTER DiagInfo, SQLSMALLINT Buf
ferLength,
SQLSMALLINT *StringLength);
SQLRETURN SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLRETURN SQL_API SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Hand
SQLSMALLINT RecNumber, SQLCHAR *Sqlstate, le,
SQLINTEGER *NativeError, SQLCHAR *MessageText, SQLSMALLINT RecNumber, SQLCHAR *Sqlsta
SQLSMALLINT BufferLength, SQLSMALLINT *TextLength); te,
SQLINTEGER *NativeError, SQLCHAR *Mess
ageText,
SQLSMALLINT BufferLength, SQLSMALLINT
*TextLength);
SQLRETURN SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLRETURN SQL_API SQLGetEnvAttr(SQLHENV EnvironmentHandle,
SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER Attribute, SQLPOINTER Value
SQLINTEGER BufferLength, SQLINTEGER *StringLength); ,
SQLINTEGER BufferLength, SQLINTEGER *S
tringLength);
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
SQLRETURN SQLGetFunctions(SQLHDBC ConnectionHandle, SQLRETURN SQL_API SQLGetFunctions(SQLHDBC ConnectionHandle,
SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported); SQLUSMALLINT FunctionId, SQLUSMALLIN
T *Supported);
SQLRETURN SQLGetInfo(SQLHDBC ConnectionHandle, SQLRETURN SQL_API SQLGetInfo(SQLHDBC ConnectionHandle,
SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLUSMALLINT InfoType, SQLPOINTER InfoVal
SQLSMALLINT BufferLength, SQLSMALLINT *StringLength); ue,
SQLSMALLINT BufferLength, SQLSMALLINT *St
ringLength);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLGetStmtAttr(SQLHSTMT StatementHandle,
SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER Attribute, SQLPOINTER Valu
SQLINTEGER BufferLength, SQLINTEGER *StringLength); e,
SQLINTEGER BufferLength, SQLINTEGER *
StringLength);
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
SQLRETURN SQLGetStmtOption(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLGetStmtOption(SQLHSTMT StatementHandle,
SQLUSMALLINT Option, SQLPOINTER Value); SQLUSMALLINT Option, SQLPOINTER Val
ue);
SQLRETURN SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLGetTypeInfo(SQLHSTMT StatementHandle,
SQLSMALLINT DataType); SQLSMALLINT DataType);
SQLRETURN SQLNumResultCols(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLNumResultCols(SQLHSTMT StatementHandle,
SQLSMALLINT *ColumnCount); SQLSMALLINT *ColumnCount);
SQLRETURN SQLParamData(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLParamData(SQLHSTMT StatementHandle,
SQLPOINTER *Value); SQLPOINTER *Value);
SQLRETURN SQLPrepare(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLPrepare(SQLHSTMT StatementHandle,
SQLCHAR *StatementText, SQLINTEGER TextLength); SQLCHAR *StatementText, SQLINTEGER TextLe
ngth);
SQLRETURN SQLPutData(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLPutData(SQLHSTMT StatementHandle,
SQLPOINTER Data, SQLLEN StrLen_or_Ind); SQLPOINTER Data, SQLLEN StrLen_or_Ind);
SQLRETURN SQLRowCount(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLRowCount(SQLHSTMT StatementHandle,
SQLLEN *RowCount); SQLLEN *RowCount);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLRETURN SQL_API SQLSetConnectAttr(SQLHDBC ConnectionHandle,
SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER Attribute, SQLPOINTER V
SQLINTEGER StringLength); alue,
SQLINTEGER StringLength);
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
SQLRETURN SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLRETURN SQL_API SQLSetConnectOption(SQLHDBC ConnectionHandle,
SQLUSMALLINT Option, SQLULEN Value); SQLUSMALLINT Option, SQLULEN Val
ue);
SQLRETURN SQLSetCursorName(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLSetCursorName(SQLHSTMT StatementHandle,
SQLCHAR *CursorName, SQLSMALLINT NameLength); SQLCHAR *CursorName, SQLSMALLINT Na
meLength);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLSetDescField(SQLHDESC DescriptorHandle, SQLRETURN SQL_API SQLSetDescField(SQLHDESC DescriptorHandle,
SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLSMALLINT RecNumber, SQLSMALLINT F
SQLPOINTER Value, SQLINTEGER BufferLength); ieldIdentifier,
SQLPOINTER Value, SQLINTEGER BufferL
ength);
SQLRETURN SQLSetDescRec(SQLHDESC DescriptorHandle, SQLRETURN SQL_API SQLSetDescRec(SQLHDESC DescriptorHandle,
SQLSMALLINT RecNumber, SQLSMALLINT Type, SQLSMALLINT RecNumber, SQLSMALLINT Typ
SQLSMALLINT SubType, SQLLEN Length, e,
SQLSMALLINT Precision, SQLSMALLINT Scale, SQLSMALLINT SubType, SQLLEN Length,
SQLPOINTER Data, SQLLEN *StringLength, SQLSMALLINT Precision, SQLSMALLINT Sca
SQLLEN *Indicator); le,
SQLPOINTER Data, SQLLEN *StringLength,
SQLLEN *Indicator);
SQLRETURN SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLRETURN SQL_API SQLSetEnvAttr(SQLHENV EnvironmentHandle,
SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER Attribute, SQLPOINTER Value
SQLINTEGER StringLength); ,
SQLINTEGER StringLength);
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
SQLRETURN SQLSetParam(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLSetParam(SQLHSTMT StatementHandle,
SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType, SQLUSMALLINT ParameterNumber, SQLSMALLIN
SQLSMALLINT ParameterType, SQLULEN LengthPrecision, T ValueType,
SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLSMALLINT ParameterType, SQLULEN Lengt
SQLLEN *StrLen_or_Ind); hPrecision,
SQLSMALLINT ParameterScale, SQLPOINTER P
arameterValue,
SQLLEN *StrLen_or_Ind);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLSetStmtAttr(SQLHSTMT StatementHandle,
SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER Attribute, SQLPOINTER Valu
SQLINTEGER StringLength); e,
SQLINTEGER StringLength);
#endif #endif
SQLRETURN SQLSetStmtOption(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLSetStmtOption(SQLHSTMT StatementHandle,
SQLUSMALLINT Option, SQLROWCOUNT Value); SQLUSMALLINT Option, SQLULEN Value)
;
SQLRETURN SQLSpecialColumns(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLSpecialColumns(SQLHSTMT StatementHandle,
SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName, SQLUSMALLINT IdentifierType, SQLCH
SQLSMALLINT NameLength1, SQLCHAR *SchemaName, AR *CatalogName,
SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength1, SQLCHAR *
SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SchemaName,
SQLUSMALLINT Nullable); SQLSMALLINT NameLength2, SQLCHAR *
TableName,
SQLSMALLINT NameLength3, SQLUSMALL
INT Scope,
SQLUSMALLINT Nullable);
SQLRETURN SQLStatistics(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLStatistics(SQLHSTMT StatementHandle,
SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *CatalogName, SQLSMALLINT Name
SQLCHAR *SchemaName, SQLSMALLINT NameLength2, Length1,
SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *SchemaName, SQLSMALLINT NameL
SQLUSMALLINT Unique, SQLUSMALLINT Reserved); ength2,
SQLCHAR *TableName, SQLSMALLINT NameLe
ngth3,
SQLUSMALLINT Unique, SQLUSMALLINT Rese
rved);
SQLRETURN SQLTables(SQLHSTMT StatementHandle, SQLRETURN SQL_API SQLTables(SQLHSTMT StatementHandle,
SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *CatalogName, SQLSMALLINT NameLen
SQLCHAR *SchemaName, SQLSMALLINT NameLength2, gth1,
SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *SchemaName, SQLSMALLINT NameLeng
SQLCHAR *TableType, SQLSMALLINT NameLength4); th2,
SQLCHAR *TableName, SQLSMALLINT NameLengt
h3,
SQLCHAR *TableType, SQLSMALLINT NameLengt
h4);
SQLRETURN SQLTransact(SQLHENV EnvironmentHandle, SQLRETURN SQL_API SQLTransact(SQLHENV EnvironmentHandle,
SQLHDBC ConnectionHandle, SQLUSMALLINT CompletionType); SQLHDBC ConnectionHandle, SQLUSMALLINT C
ompletionType);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 62 change blocks. 
165 lines changed or deleted 263 lines changed or added


 sqlext.h   sqlext.h 
skipping to change at line 41 skipping to change at line 41
#define SQLColumns_REMARKS 12 #define SQLColumns_REMARKS 12
#define SQLColumns_COLUMN_DEF 13 #define SQLColumns_COLUMN_DEF 13
#define SQLColumns_SQL_DATA_TYPE 14 #define SQLColumns_SQL_DATA_TYPE 14
#define SQLColumns_SQL_DATETIME_SUB 15 #define SQLColumns_SQL_DATETIME_SUB 15
#define SQLColumns_CHAR_OCTET_LENGTH 16 #define SQLColumns_CHAR_OCTET_LENGTH 16
#define SQLColumns_ORDINAL_POSITION 17 #define SQLColumns_ORDINAL_POSITION 17
#define SQLColumns_IS_NULLABLE 18 #define SQLColumns_IS_NULLABLE 18
/* END - unixODBC ONLY */ /* END - unixODBC ONLY */
#ifndef __SQL_H
#include "sql.h" #include "sql.h"
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */ extern "C" { /* Assume C declarations for C++ */
#endif #endif
/* generally useful constants */ /* generally useful constants */
#define SQL_SPEC_MAJOR 3 /* Major version of specification * / #define SQL_SPEC_MAJOR 3 /* Major version of specification * /
#define SQL_SPEC_MINOR 52 /* Minor version of specification * / #define SQL_SPEC_MINOR 52 /* Minor version of specification * /
#define SQL_SPEC_STRING "03.52" /* String constant for version */ #define SQL_SPEC_STRING "03.52" /* String constant for version */
skipping to change at line 98 skipping to change at line 100
/* values for SQL_ATTR_CP_MATCH */ /* values for SQL_ATTR_CP_MATCH */
#define SQL_CP_STRICT_MATCH 0UL #define SQL_CP_STRICT_MATCH 0UL
#define SQL_CP_RELAXED_MATCH 1UL #define SQL_CP_RELAXED_MATCH 1UL
#define SQL_CP_MATCH_DEFAULT SQL_CP_STRICT_MATCH #define SQL_CP_MATCH_DEFAULT SQL_CP_STRICT_MATCH
/* values for SQL_ATTR_ODBC_VERSION */ /* values for SQL_ATTR_ODBC_VERSION */
#define SQL_OV_ODBC2 2UL #define SQL_OV_ODBC2 2UL
#define SQL_OV_ODBC3 3UL #define SQL_OV_ODBC3 3UL
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
#if (ODBCVER >= 0x0380)
/* new values for SQL_ATTR_ODBC_VERSION */
/* From ODBC 3.8 onwards, we should use <major version> * 100 + <minor vers
ion> */
#define SQL_OV_ODBC3_80 380UL
#endif /* ODBCVER >= 0x0380 */
/* connection attributes */ /* connection attributes */
#define SQL_ACCESS_MODE 101 #define SQL_ACCESS_MODE 101
#define SQL_AUTOCOMMIT 102 #define SQL_AUTOCOMMIT 102
#define SQL_LOGIN_TIMEOUT 103 #define SQL_LOGIN_TIMEOUT 103
#define SQL_OPT_TRACE 104 #define SQL_OPT_TRACE 104
#define SQL_OPT_TRACEFILE 105 #define SQL_OPT_TRACEFILE 105
#define SQL_TRANSLATE_DLL 106 #define SQL_TRANSLATE_DLL 106
#define SQL_TRANSLATE_OPTION 107 #define SQL_TRANSLATE_OPTION 107
#define SQL_TXN_ISOLATION 108 #define SQL_TXN_ISOLATION 108
#define SQL_CURRENT_QUALIFIER 109 #define SQL_CURRENT_QUALIFIER 109
skipping to change at line 134 skipping to change at line 142
#define SQL_ATTR_QUIET_MODE SQL_QUIET_MODE #define SQL_ATTR_QUIET_MODE SQL_QUIET_MODE
#define SQL_ATTR_TRACE SQL_OPT_TRACE #define SQL_ATTR_TRACE SQL_OPT_TRACE
#define SQL_ATTR_TRACEFILE SQL_OPT_TRACEFILE #define SQL_ATTR_TRACEFILE SQL_OPT_TRACEFILE
#define SQL_ATTR_TRANSLATE_LIB SQL_TRANSLATE_DLL #define SQL_ATTR_TRANSLATE_LIB SQL_TRANSLATE_DLL
#define SQL_ATTR_TRANSLATE_OPTION SQL_TRANSLATE_OPTION #define SQL_ATTR_TRANSLATE_OPTION SQL_TRANSLATE_OPTION
#define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION #define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
#define SQL_ATTR_CONNECTION_DEAD 1209 /* GetConnectAttr only */ #define SQL_ATTR_CONNECTION_DEAD 1209 /* GetConnectAttr only */
#define SQL_ATTR_DRIVER_THREADING 1028 /* Driver threading level */
#if (ODBCVER >= 0x0351) #if (ODBCVER >= 0x0351)
/* ODBC Driver Manager sets this connection attribute to a unicode driv er /* ODBC Driver Manager sets this connection attribute to a unicode driv er
(which supports SQLConnectW) when the application is an ANSI applica tion (which supports SQLConnectW) when the application is an ANSI applica tion
(which calls SQLConnect, SQLDriverConnect, or SQLBrowseConnect). (which calls SQLConnect, SQLDriverConnect, or SQLBrowseConnect).
This is SetConnectAttr only and application does not set this attrib ute This is SetConnectAttr only and application does not set this attrib ute
This attribute was introduced because some unicode driver's some API s may This attribute was introduced because some unicode driver's some API s may
need to behave differently on ANSI or Unicode applications. A unicod e need to behave differently on ANSI or Unicode applications. A unicod e
driver, which has same behavior for both ANSI or Unicode applicatio ns, driver, which has same behavior for both ANSI or Unicode applicatio ns,
should return SQL_ERROR when the driver manager sets this connection should return SQL_ERROR when the driver manager sets this connection
attribute. When a unicode driver returns SQL_SUCCESS on this attribu te, attribute. When a unicode driver returns SQL_SUCCESS on this attribu te,
the driver manager treates ANSI and Unicode connections differently in the driver manager treates ANSI and Unicode connections differently in
connection pooling. connection pooling.
*/ */
#define SQL_ATTR_ANSI_APP 115 #define SQL_ATTR_ANSI_APP 115
#endif #endif
#if (ODBCVER >= 0x0380)
#define SQL_ATTR_RESET_CONNECTION 116
#define SQL_ATTR_ASYNC_DBC_FUNCTIONS_ENABLE 117
#endif
/* SQL_CONNECT_OPT_DRVR_START is not meaningful for 3.0 driver */ /* SQL_CONNECT_OPT_DRVR_START is not meaningful for 3.0 driver */
#if (ODBCVER < 0x0300) #if (ODBCVER < 0x0300)
#define SQL_CONNECT_OPT_DRVR_START 1000 #define SQL_CONNECT_OPT_DRVR_START 1000
#endif /* ODBCVER < 0x0300 */ #endif /* ODBCVER < 0x0300 */
#if (ODBCVER < 0x0300) #if (ODBCVER < 0x0300)
#define SQL_CONN_OPT_MAX SQL_PACKET_SIZE #define SQL_CONN_OPT_MAX SQL_PACKET_SIZE
#define SQL_CONN_OPT_MIN SQL_ACCESS_MODE #define SQL_CONN_OPT_MIN SQL_ACCESS_MODE
#endif /* ODBCVER < 0x0300 */ #endif /* ODBCVER < 0x0300 */
skipping to change at line 177 skipping to change at line 192
#define SQL_AUTOCOMMIT_ON 1UL #define SQL_AUTOCOMMIT_ON 1UL
#define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON #define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON
/* SQL_LOGIN_TIMEOUT options */ /* SQL_LOGIN_TIMEOUT options */
#define SQL_LOGIN_TIMEOUT_DEFAULT 15UL #define SQL_LOGIN_TIMEOUT_DEFAULT 15UL
/* SQL_OPT_TRACE options */ /* SQL_OPT_TRACE options */
#define SQL_OPT_TRACE_OFF 0UL #define SQL_OPT_TRACE_OFF 0UL
#define SQL_OPT_TRACE_ON 1UL #define SQL_OPT_TRACE_ON 1UL
#define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF #define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF
#define SQL_OPT_TRACE_FILE_DEFAULT "\\SQL.LOG" #define SQL_OPT_TRACE_FILE_DEFAULT "/tmp/SQL.LOG"
/* SQL_ODBC_CURSORS options */ /* SQL_ODBC_CURSORS options */
#define SQL_CUR_USE_IF_NEEDED 0UL #define SQL_CUR_USE_IF_NEEDED 0UL
#define SQL_CUR_USE_ODBC 1UL #define SQL_CUR_USE_ODBC 1UL
#define SQL_CUR_USE_DRIVER 2UL #define SQL_CUR_USE_DRIVER 2UL
#define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER #define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
/* values for SQL_ATTR_DISCONNECT_BEHAVIOR */ /* values for SQL_ATTR_DISCONNECT_BEHAVIOR */
#define SQL_DB_RETURN_TO_POOL 0UL #define SQL_DB_RETURN_TO_POOL 0UL
skipping to change at line 205 skipping to change at line 220
/* values for SQL_ATTR_CONNECTION_DEAD */ /* values for SQL_ATTR_CONNECTION_DEAD */
#define SQL_CD_TRUE 1L /* C onnection is closed/dead */ #define SQL_CD_TRUE 1L /* C onnection is closed/dead */
#define SQL_CD_FALSE 0L /* Connectio n is open/available */ #define SQL_CD_FALSE 0L /* Connectio n is open/available */
/* values for SQL_ATTR_ANSI_APP */ /* values for SQL_ATTR_ANSI_APP */
#if (ODBCVER >= 0x0351) #if (ODBCVER >= 0x0351)
#define SQL_AA_TRUE 1L /* the appli cation is an ANSI app */ #define SQL_AA_TRUE 1L /* the appli cation is an ANSI app */
#define SQL_AA_FALSE 0L /* the appli cation is a Unicode app */ #define SQL_AA_FALSE 0L /* the appli cation is a Unicode app */
#endif #endif
/* values for SQL_ATTR_RESET_CONNECTION */
#if (ODBCVER >= 0x0380)
#define SQL_RESET_CONNECTION_YES 1UL
#endif
/* values for SQL_ATTR_ASYNC_DBC_FUNCTIONS_ENABLE */
#if (ODBCVER >= 0x0380)
#define SQL_ASYNC_DBC_ENABLE_ON 1UL
#define SQL_ASYNC_DBC_ENABLE_OFF 0UL
#define SQL_ASYNC_DBC_ENABLE_DEFAULT SQL_ASYNC_DBC_ENABLE_OFF
#endif
/* statement attributes */ /* statement attributes */
#define SQL_QUERY_TIMEOUT 0 #define SQL_QUERY_TIMEOUT 0
#define SQL_MAX_ROWS 1 #define SQL_MAX_ROWS 1
#define SQL_NOSCAN 2 #define SQL_NOSCAN 2
#define SQL_MAX_LENGTH 3 #define SQL_MAX_LENGTH 3
#define SQL_ASYNC_ENABLE 4 /* same as SQL_ATTR_ASYNC_EN ABLE */ #define SQL_ASYNC_ENABLE 4 /* same as SQL_ATTR_ASYNC_EN ABLE */
#define SQL_BIND_TYPE 5 #define SQL_BIND_TYPE 5
#define SQL_CURSOR_TYPE 6 #define SQL_CURSOR_TYPE 6
#define SQL_CONCURRENCY 7 #define SQL_CONCURRENCY 7
#define SQL_KEYSET_SIZE 8 #define SQL_KEYSET_SIZE 8
skipping to change at line 520 skipping to change at line 547
#define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED BIGIN T */ #define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED BIGIN T */
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
#define SQL_C_TINYINT SQL_TINYINT #define SQL_C_TINYINT SQL_TINYINT
#define SQL_C_SLONG (SQL_C_LONG+SQL_SIGNED_OFFSET) /* SIGNED INTEGE R */ #define SQL_C_SLONG (SQL_C_LONG+SQL_SIGNED_OFFSET) /* SIGNED INTEGE R */
#define SQL_C_SSHORT (SQL_C_SHORT+SQL_SIGNED_OFFSET) /* SIGNED SMALLI NT */ #define SQL_C_SSHORT (SQL_C_SHORT+SQL_SIGNED_OFFSET) /* SIGNED SMALLI NT */
#define SQL_C_STINYINT (SQL_TINYINT+SQL_SIGNED_OFFSET) /* SIGNED TINYIN T */ #define SQL_C_STINYINT (SQL_TINYINT+SQL_SIGNED_OFFSET) /* SIGNED TINYIN T */
#define SQL_C_ULONG (SQL_C_LONG+SQL_UNSIGNED_OFFSET) /* UNSIGNED INTE GER*/ #define SQL_C_ULONG (SQL_C_LONG+SQL_UNSIGNED_OFFSET) /* UNSIGNED INTE GER*/
#define SQL_C_USHORT (SQL_C_SHORT+SQL_UNSIGNED_OFFSET) /* UNSIGNED SMAL LINT*/ #define SQL_C_USHORT (SQL_C_SHORT+SQL_UNSIGNED_OFFSET) /* UNSIGNED SMAL LINT*/
#define SQL_C_UTINYINT (SQL_TINYINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED TINY INT*/ #define SQL_C_UTINYINT (SQL_TINYINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED TINY INT*/
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300) && (SIZEOF_LONG_INT == 8) && !defined(BUILD_LEGACY_
#define SQL_C_BOOKMARK SQL_C_ULONG /* BOOKMARK 64_BIT_MODE)
*/
#else
#if (SIZEOF_LONG == 8)
#ifndef DO_YOU_KNOW_WHAT_YOUR_ARE_DOING
#define SQL_C_BOOKMARK SQL_C_ULONG /* BOOKMARK
*/
#else
#define SQL_C_BOOKMARK SQL_C_UBIGINT /* BOOKMARK */ #define SQL_C_BOOKMARK SQL_C_UBIGINT /* BOOKMARK */
#endif
#else #else
#define SQL_C_BOOKMARK SQL_C_ULONG /* BOOKMARK */ #define SQL_C_BOOKMARK SQL_C_ULONG /* BOOKMARK */
#endif #endif
#endif
#if (ODBCVER >= 0x0350) #if (ODBCVER >= 0x0350)
#define SQL_C_GUID SQL_GUID #define SQL_C_GUID SQL_GUID
#endif /* ODBCVER >= 0x0350 */ #endif /* ODBCVER >= 0x0350 */
#define SQL_TYPE_NULL 0 #define SQL_TYPE_NULL 0
#if (ODBCVER < 0x0300) #if (ODBCVER < 0x0300)
#define SQL_TYPE_MIN SQL_BIT #define SQL_TYPE_MIN SQL_BIT
#define SQL_TYPE_MAX SQL_VARCHAR #define SQL_TYPE_MAX SQL_VARCHAR
#endif #endif
/* base value of driver-specific C-Type (max is 0x7fff) */
/* define driver-specific C-Type, named as SQL_DRIVER_C_TYPE_BASE, */
/* SQL_DRIVER_C_TYPE_BASE+1, SQL_DRIVER_C_TYPE_BASE+2, etc. */
#if (ODBCVER >= 0x380)
#define SQL_DRIVER_C_TYPE_BASE 0x4000
#endif
/* base value of driver-specific fields/attributes (max are 0x7fff [16-bit]
or 0x00007fff [32-bit]) */
/* define driver-specific SQL-Type, named as SQL_DRIVER_SQL_TYPE_BASE, */
/* SQL_DRIVER_SQL_TYPE_BASE+1, SQL_DRIVER_SQL_TYPE_BASE+2, etc. */
/* */
/* Please note that there is no runtime change in this version of DM. */
/* However, we suggest that driver manufacturers adhere to this range */
/* as future versions of the DM may enforce these constraints */
#if (ODBCVER >= 0x380)
#define SQL_DRIVER_SQL_TYPE_BASE 0x4000
#define SQL_DRIVER_DESC_FIELD_BASE 0x4000
#define SQL_DRIVER_DIAG_FIELD_BASE 0x4000
#define SQL_DRIVER_INFO_TYPE_BASE 0x4000
#define SQL_DRIVER_CONN_ATTR_BASE 0x00004000
#define SQL_DRIVER_STMT_ATTR_BASE 0x00004000
#endif
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
#define SQL_C_VARBOOKMARK SQL_C_BINARY #define SQL_C_VARBOOKMARK SQL_C_BINARY
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
/* define for SQL_DIAG_ROW_NUMBER and SQL_DIAG_COLUMN_NUMBER */ /* define for SQL_DIAG_ROW_NUMBER and SQL_DIAG_COLUMN_NUMBER */
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
#define SQL_NO_ROW_NUMBER (-1) #define SQL_NO_ROW_NUMBER (-1)
#define SQL_NO_COLUMN_NUMBER (-1) #define SQL_NO_COLUMN_NUMBER (-1)
#define SQL_ROW_NUMBER_UNKNOWN (-2) #define SQL_ROW_NUMBER_UNKNOWN (-2)
#define SQL_COLUMN_NUMBER_UNKNOWN (-2) #define SQL_COLUMN_NUMBER_UNKNOWN (-2)
skipping to change at line 763 skipping to change at line 805
#define SQL_CONVERT_LONGVARCHAR 62 #define SQL_CONVERT_LONGVARCHAR 62
#define SQL_CONVERT_NUMERIC 63 #define SQL_CONVERT_NUMERIC 63
#define SQL_CONVERT_REAL 64 #define SQL_CONVERT_REAL 64
#define SQL_CONVERT_SMALLINT 65 #define SQL_CONVERT_SMALLINT 65
#define SQL_CONVERT_TIME 66 #define SQL_CONVERT_TIME 66
#define SQL_CONVERT_TIMESTAMP 67 #define SQL_CONVERT_TIMESTAMP 67
#define SQL_CONVERT_TINYINT 68 #define SQL_CONVERT_TINYINT 68
#define SQL_CONVERT_VARBINARY 69 #define SQL_CONVERT_VARBINARY 69
#define SQL_CONVERT_VARCHAR 70 #define SQL_CONVERT_VARCHAR 70
#define SQL_CONVERT_LONGVARBINARY 71 #define SQL_CONVERT_LONGVARBINARY 71
#define SQL_CONVERT_GUID 173
#define SQL_ODBC_SQL_OPT_IEF 73 /* SQL_INTEGRITY */ #define SQL_ODBC_SQL_OPT_IEF 73 /* SQL_INTEGRITY */
#define SQL_CORRELATION_NAME 74 #define SQL_CORRELATION_NAME 74
#define SQL_NON_NULLABLE_COLUMNS 75 #define SQL_NON_NULLABLE_COLUMNS 75
#define SQL_DRIVER_HLIB 76 #define SQL_DRIVER_HLIB 76
#define SQL_DRIVER_ODBC_VER 77 #define SQL_DRIVER_ODBC_VER 77
#define SQL_LOCK_TYPES 78 #define SQL_LOCK_TYPES 78
#define SQL_POS_OPERATIONS 79 #define SQL_POS_OPERATIONS 79
#define SQL_POSITIONED_STATEMENTS 80 #define SQL_POSITIONED_STATEMENTS 80
#define SQL_BOOKMARK_PERSISTENCE 82 #define SQL_BOOKMARK_PERSISTENCE 82
#define SQL_STATIC_SENSITIVITY 83 #define SQL_STATIC_SENSITIVITY 83
skipping to change at line 888 skipping to change at line 931
#define SQL_STATIC_CURSOR_ATTRIBUTES1 167 #define SQL_STATIC_CURSOR_ATTRIBUTES1 167
#define SQL_STATIC_CURSOR_ATTRIBUTES2 168 #define SQL_STATIC_CURSOR_ATTRIBUTES2 168
#define SQL_AGGREGATE_FUNCTIONS 169 #define SQL_AGGREGATE_FUNCTIONS 169
#define SQL_DDL_INDEX 170 #define SQL_DDL_INDEX 170
#define SQL_DM_VER 171 #define SQL_DM_VER 171
#define SQL_INSERT_STATEMENT 172 #define SQL_INSERT_STATEMENT 172
#define SQL_UNION_STATEMENT SQL_ UNION #define SQL_UNION_STATEMENT SQL_ UNION
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
#if (ODBCVER >= 0x0380)
/* Info Types */
#define SQL_ASYNC_DBC_FUNCTIONS 10023
#endif
#define SQL_DTC_TRANSITION_COST 1750 #define SQL_DTC_TRANSITION_COST 1750
/* SQL_ALTER_TABLE bitmasks */ /* SQL_ALTER_TABLE bitmasks */
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
/* the following 5 bitmasks are defined in sql.h /* the following 5 bitmasks are defined in sql.h
*#define SQL_AT_ADD_COLUMN 0x00000001L *#define SQL_AT_ADD_COLUMN 0x00000001L
*#define SQL_AT_DROP_COLUMN 0x00000002L *#define SQL_AT_DROP_COLUMN 0x00000002L
*#define SQL_AT_ADD_CONSTRAINT 0x00000008L *#define SQL_AT_ADD_CONSTRAINT 0x00000008L
*/ */
#define SQL_AT_ADD_COLUMN_SINGLE 0x00 000020L #define SQL_AT_ADD_COLUMN_SINGLE 0x00 000020L
skipping to change at line 941 skipping to change at line 989
#define SQL_CVT_DATE 0x00008000L #define SQL_CVT_DATE 0x00008000L
#define SQL_CVT_TIME 0x00010000L #define SQL_CVT_TIME 0x00010000L
#define SQL_CVT_TIMESTAMP 0x00020000L #define SQL_CVT_TIMESTAMP 0x00020000L
#define SQL_CVT_LONGVARBINARY 0x00040000L #define SQL_CVT_LONGVARBINARY 0x00040000L
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
#define SQL_CVT_INTERVAL_YEAR_MONTH 0x00080000L #define SQL_CVT_INTERVAL_YEAR_MONTH 0x00080000L
#define SQL_CVT_INTERVAL_DAY_TIME 0x00100000L #define SQL_CVT_INTERVAL_DAY_TIME 0x00100000L
#define SQL_CVT_WCHAR 0x00 200000L #define SQL_CVT_WCHAR 0x00 200000L
#define SQL_CVT_WLONGVARCHAR 0x00400000L #define SQL_CVT_WLONGVARCHAR 0x00400000L
#define SQL_CVT_WVARCHAR 0x00 800000L #define SQL_CVT_WVARCHAR 0x00 800000L
#define SQL_CVT_GUID 0x01 000000L
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
/* SQL_CONVERT_FUNCTIONS functions */ /* SQL_CONVERT_FUNCTIONS functions */
#define SQL_FN_CVT_CONVERT 0x00000001L #define SQL_FN_CVT_CONVERT 0x00000001L
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
#define SQL_FN_CVT_CAST 0x00 000002L #define SQL_FN_CVT_CAST 0x00 000002L
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
/* SQL_STRING_FUNCTIONS functions */ /* SQL_STRING_FUNCTIONS functions */
skipping to change at line 1216 skipping to change at line 1265
#define SQL_FILE_NOT_SUPPORTED 0x0000 #define SQL_FILE_NOT_SUPPORTED 0x0000
#define SQL_FILE_TABLE 0x0001 #define SQL_FILE_TABLE 0x0001
#define SQL_FILE_QUALIFIER 0x0002 #define SQL_FILE_QUALIFIER 0x0002
#define SQL_FILE_CATALOG SQL_FILE_QUA LIFIER /* ODBC 3.0 */ #define SQL_FILE_CATALOG SQL_FILE_QUA LIFIER /* ODBC 3.0 */
/* SQL_GETDATA_EXTENSIONS values */ /* SQL_GETDATA_EXTENSIONS values */
#define SQL_GD_BLOCK 0x00000004L #define SQL_GD_BLOCK 0x00000004L
#define SQL_GD_BOUND 0x00000008L #define SQL_GD_BOUND 0x00000008L
#if (ODBCVER >= 0x0380)
#define SQL_GD_OUTPUT_PARAMS 0x00000010L
#endif
/* SQL_POSITIONED_STATEMENTS masks */ /* SQL_POSITIONED_STATEMENTS masks */
#define SQL_PS_POSITIONED_DELETE 0x00000001L #define SQL_PS_POSITIONED_DELETE 0x00000001L
#define SQL_PS_POSITIONED_UPDATE 0x00000002L #define SQL_PS_POSITIONED_UPDATE 0x00000002L
#define SQL_PS_SELECT_FOR_UPDATE 0x00000004L #define SQL_PS_SELECT_FOR_UPDATE 0x00000004L
/* SQL_GROUP_BY values */ /* SQL_GROUP_BY values */
#define SQL_GB_NOT_SUPPORTED 0x0000 #define SQL_GB_NOT_SUPPORTED 0x0000
skipping to change at line 1625 skipping to change at line 1677
/* SQL_UNION_STATEMENT bitmasks */ /* SQL_UNION_STATEMENT bitmasks */
#define SQL_US_UNION SQL_ U_UNION #define SQL_US_UNION SQL_ U_UNION
#define SQL_US_UNION_ALL SQL_ U_UNION_ALL #define SQL_US_UNION_ALL SQL_ U_UNION_ALL
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
/* SQL_DTC_TRANSITION_COST bitmasks */ /* SQL_DTC_TRANSITION_COST bitmasks */
#define SQL_DTC_ENLIST_EXPENSIVE 0x00000001L #define SQL_DTC_ENLIST_EXPENSIVE 0x00000001L
#define SQL_DTC_UNENLIST_EXPENSIVE 0x00000002L #define SQL_DTC_UNENLIST_EXPENSIVE 0x00000002L
#if (ODBCVER >= 0x0380)
/* possible values for SQL_ASYNC_DBC_FUNCTIONS */
#define SQL_ASYNC_DBC_NOT_CAPABLE 0x00000000L
#define SQL_ASYNC_DBC_CAPABLE 0x00000001L
#endif
/* additional SQLDataSources fetch directions */ /* additional SQLDataSources fetch directions */
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
#define SQL_FETCH_FIRST_USER 31 #define SQL_FETCH_FIRST_USER 31
#define SQL_FETCH_FIRST_SYSTEM 32 #define SQL_FETCH_FIRST_SYSTEM 32
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
/* Defines for SQLSetPos */ /* Defines for SQLSetPos */
#define SQL_ENTIRE_ROWSET 0 #define SQL_ENTIRE_ROWSET 0
/* Operations in SQLSetPos */ /* Operations in SQLSetPos */
skipping to change at line 1695 skipping to change at line 1753
#define SQL_ALL_SCHEMAS "%" #define SQL_ALL_SCHEMAS "%"
#define SQL_ALL_TABLE_TYPES "%" #define SQL_ALL_TABLE_TYPES "%"
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
/* Options for SQLDriverConnect */ /* Options for SQLDriverConnect */
#define SQL_DRIVER_NOPROMPT 0 #define SQL_DRIVER_NOPROMPT 0
#define SQL_DRIVER_COMPLETE 1 #define SQL_DRIVER_COMPLETE 1
#define SQL_DRIVER_PROMPT 2 #define SQL_DRIVER_PROMPT 2
#define SQL_DRIVER_COMPLETE_REQUIRED 3 #define SQL_DRIVER_COMPLETE_REQUIRED 3
SQLRETURN SQLDriverConnect( SQLRETURN SQL_API SQLDriverConnect(
SQLHDBC hdbc, SQLHDBC hdbc,
SQLHWND hwnd, SQLHWND hwnd,
SQLCHAR *szConnStrIn, SQLCHAR *szConnStrIn,
SQLSMALLINT cbConnStrIn, SQLSMALLINT cbConnStrIn,
SQLCHAR *szConnStrOut, SQLCHAR *szConnStrOut,
SQLSMALLINT cbConnStrOutMax, SQLSMALLINT cbConnStrOutMax,
SQLSMALLINT *pcbConnStrOut, SQLSMALLINT *pcbConnStrOut,
SQLUSMALLINT fDriverCompletion); SQLUSMALLINT fDriverCompletion);
/* Level 2 Functions */ /* Level 2 Functions */
skipping to change at line 1762 skipping to change at line 1820
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
/* Defines for SQLBindParameter and /* Defines for SQLBindParameter and
SQLProcedureColumns (returned in the result set) */ SQLProcedureColumns (returned in the result set) */
#define SQL_PARAM_TYPE_UNKNOWN 0 #define SQL_PARAM_TYPE_UNKNOWN 0
#define SQL_PARAM_INPUT 1 #define SQL_PARAM_INPUT 1
#define SQL_PARAM_INPUT_OUTPUT 2 #define SQL_PARAM_INPUT_OUTPUT 2
#define SQL_RESULT_COL 3 #define SQL_RESULT_COL 3
#define SQL_PARAM_OUTPUT 4 #define SQL_PARAM_OUTPUT 4
#define SQL_RETURN_VALUE 5 #define SQL_RETURN_VALUE 5
#if (ODBCVER >= 0x0380)
#define SQL_PARAM_INPUT_OUTPUT_STREAM 8
#define SQL_PARAM_OUTPUT_STREAM 16
#endif
/* Defines for SQLProcedures (returned in the result set) */ /* Defines for SQLProcedures (returned in the result set) */
#define SQL_PT_UNKNOWN 0 #define SQL_PT_UNKNOWN 0
#define SQL_PT_PROCEDURE 1 #define SQL_PT_PROCEDURE 1
#define SQL_PT_FUNCTION 2 #define SQL_PT_FUNCTION 2
/* This define is too large for RC */ /* This define is too large for RC */
#define SQL_ODBC_KEYWORDS "ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,A #define SQL_ODBC_KEYWORDS "ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,A
NY,ARE,AS," NY,ARE,AS,"\
/*
"ASC,ASSERTION,AT,AUTHORIZATION,AVG,"\ "ASC,ASSERTION,AT,AUTHORIZATION,AVG,"\
"BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,"\ "BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,"\
"CHAR,CHAR_LENGTH,CHARACTER,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,"\ "CHAR,CHAR_LENGTH,CHARACTER,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,"\
"COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,"\ "COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,"\
"CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,"\ "CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,"\
"CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,"\ "CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,"\
"DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,"\ "DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,"\
"DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,"\ "DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,"\
"DISTINCT,DOMAIN,DOUBLE,DROP,"\ "DISTINCT,DOMAIN,DOUBLE,DROP,"\
"ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,EXEC,EXECUTE,"\ "ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,EXEC,EXECUTE,"\
skipping to change at line 1801 skipping to change at line 1862
"PRIMARY,PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,"\ "PRIMARY,PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,"\
"READ,REAL,REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWS"\ "READ,REAL,REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWS"\
"SCHEMA,SCROLL,SECOND,SECTION,SELECT,SESSION,SESSION_USER,SET,SIZE,"\ "SCHEMA,SCROLL,SECOND,SECTION,SELECT,SESSION,SESSION_USER,SET,SIZE,"\
"SMALLINT,SOME,SPACE,SQL,SQLCA,SQLCODE,SQLERROR,SQLSTATE,SQLWARNING,"\ "SMALLINT,SOME,SPACE,SQL,SQLCA,SQLCODE,SQLERROR,SQLSTATE,SQLWARNING,"\
"SUBSTRING,SUM,SYSTEM_USER,"\ "SUBSTRING,SUM,SYSTEM_USER,"\
"TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,"\ "TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,"\
"TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,"\ "TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,"\
"UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,"\ "UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,"\
"VALUE,VALUES,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,WRITE,"\ "VALUE,VALUES,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,WRITE,"\
"YEAR,ZONE" "YEAR,ZONE"
*/
SQLRETURN SQLBrowseConnect( SQLRETURN SQL_API SQLBrowseConnect(
SQLHDBC hdbc, SQLHDBC hdbc,
SQLCHAR *szConnStrIn, SQLCHAR *szConnStrIn,
SQLSMALLINT cbConnStrIn, SQLSMALLINT cbConnStrIn,
SQLCHAR *szConnStrOut, SQLCHAR *szConnStrOut,
SQLSMALLINT cbConnStrOutMax, SQLSMALLINT cbConnStrOutMax,
SQLSMALLINT *pcbConnStrOut); SQLSMALLINT *pcbConnStrOut);
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLBulkOperations( SQLRETURN SQL_API SQLBulkOperations(
SQLHSTMT StatementHandle, SQLHSTMT StatementHandle,
SQLSMALLINT Operation); SQLSMALLINT Operation);
#endif /* ODBCVER >= 0x0300 */ #endif /* ODBCVER >= 0x0300 */
SQLRETURN SQLColAttributes( SQLRETURN SQL_API SQLColAttributes(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLUSMALLINT icol, SQLUSMALLINT icol,
SQLUSMALLINT fDescType, SQLUSMALLINT fDescType,
SQLPOINTER rgbDesc, SQLPOINTER rgbDesc,
SQLSMALLINT cbDescMax, SQLSMALLINT cbDescMax,
SQLSMALLINT *pcbDesc, SQLSMALLINT *pcbDesc,
SQLLEN *pfDesc); SQLLEN *pfDesc);
SQLRETURN SQLColumnPrivileges( SQLRETURN SQL_API SQLColumnPrivileges(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLCHAR *szCatalogName, SQLCHAR *szCatalogName,
SQLSMALLINT cbCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR *szSchemaName, SQLCHAR *szSchemaName,
SQLSMALLINT cbSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR *szTableName, SQLCHAR *szTableName,
SQLSMALLINT cbTableName, SQLSMALLINT cbTableName,
SQLCHAR *szColumnName, SQLCHAR *szColumnName,
SQLSMALLINT cbColumnName); SQLSMALLINT cbColumnName);
SQLRETURN SQLDescribeParam( SQLRETURN SQL_API SQLDescribeParam(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLUSMALLINT ipar, SQLUSMALLINT ipar,
SQLSMALLINT *pfSqlType, SQLSMALLINT *pfSqlType,
SQLULEN *pcbParamDef, SQLULEN *pcbParamDef,
SQLSMALLINT *pibScale, SQLSMALLINT *pibScale,
SQLSMALLINT *pfNullable); SQLSMALLINT *pfNullable);
SQLRETURN SQLExtendedFetch( SQLRETURN SQL_API SQLExtendedFetch(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLUSMALLINT fFetchType, SQLUSMALLINT fFetchType,
SQLROWOFFSET irow, SQLLEN irow,
SQLROWSETSIZE *pcrow, SQLULEN *pcrow,
SQLUSMALLINT *rgfRowStatus); SQLUSMALLINT *rgfRowStatus);
SQLRETURN SQLForeignKeys( SQLRETURN SQL_API SQLForeignKeys(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLCHAR *szPkCatalogName, SQLCHAR *szPkCatalogName,
SQLSMALLINT cbPkCatalogName, SQLSMALLINT cbPkCatalogName,
SQLCHAR *szPkSchemaName, SQLCHAR *szPkSchemaName,
SQLSMALLINT cbPkSchemaName, SQLSMALLINT cbPkSchemaName,
SQLCHAR *szPkTableName, SQLCHAR *szPkTableName,
SQLSMALLINT cbPkTableName, SQLSMALLINT cbPkTableName,
SQLCHAR *szFkCatalogName, SQLCHAR *szFkCatalogName,
SQLSMALLINT cbFkCatalogName, SQLSMALLINT cbFkCatalogName,
SQLCHAR *szFkSchemaName, SQLCHAR *szFkSchemaName,
SQLSMALLINT cbFkSchemaName, SQLSMALLINT cbFkSchemaName,
SQLCHAR *szFkTableName, SQLCHAR *szFkTableName,
SQLSMALLINT cbFkTableName); SQLSMALLINT cbFkTableName);
SQLRETURN SQLMoreResults( SQLRETURN SQL_API SQLMoreResults(
SQLHSTMT hstmt); SQLHSTMT hstmt);
SQLRETURN SQLNativeSql( SQLRETURN SQL_API SQLNativeSql(
SQLHDBC hdbc, SQLHDBC hdbc,
SQLCHAR *szSqlStrIn, SQLCHAR *szSqlStrIn,
SQLINTEGER cbSqlStrIn, SQLINTEGER cbSqlStrIn,
SQLCHAR *szSqlStr, SQLCHAR *szSqlStr,
SQLINTEGER cbSqlStrMax, SQLINTEGER cbSqlStrMax,
SQLINTEGER *pcbSqlStr); SQLINTEGER *pcbSqlStr);
SQLRETURN SQLNumParams( SQLRETURN SQL_API SQLNumParams(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLSMALLINT *pcpar); SQLSMALLINT *pcpar);
SQLRETURN SQLParamOptions( SQLRETURN SQL_API SQLParamOptions(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLUINTEGER crow, SQLULEN crow,
SQLUINTEGER *pirow); SQLULEN *pirow);
SQLRETURN SQLPrimaryKeys( SQLRETURN SQL_API SQLPrimaryKeys(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLCHAR *szCatalogName, SQLCHAR *szCatalogName,
SQLSMALLINT cbCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR *szSchemaName, SQLCHAR *szSchemaName,
SQLSMALLINT cbSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR *szTableName, SQLCHAR *szTableName,
SQLSMALLINT cbTableName); SQLSMALLINT cbTableName);
SQLRETURN SQLProcedureColumns( SQLRETURN SQL_API SQLProcedureColumns(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLCHAR *szCatalogName, SQLCHAR *szCatalogName,
SQLSMALLINT cbCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR *szSchemaName, SQLCHAR *szSchemaName,
SQLSMALLINT cbSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR *szProcName, SQLCHAR *szProcName,
SQLSMALLINT cbProcName, SQLSMALLINT cbProcName,
SQLCHAR *szColumnName, SQLCHAR *szColumnName,
SQLSMALLINT cbColumnName); SQLSMALLINT cbColumnName);
SQLRETURN SQLProcedures( SQLRETURN SQL_API SQLProcedures(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLCHAR *szCatalogName, SQLCHAR *szCatalogName,
SQLSMALLINT cbCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR *szSchemaName, SQLCHAR *szSchemaName,
SQLSMALLINT cbSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR *szProcName, SQLCHAR *szProcName,
SQLSMALLINT cbProcName); SQLSMALLINT cbProcName);
SQLRETURN SQLSetPos( SQLRETURN SQL_API SQLSetPos(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLSETPOSIROW irow, SQLSETPOSIROW irow,
SQLUSMALLINT fOption, SQLUSMALLINT fOption,
SQLUSMALLINT fLock); SQLUSMALLINT fLock);
SQLRETURN SQLTablePrivileges( SQLRETURN SQL_API SQLTablePrivileges(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLCHAR *szCatalogName, SQLCHAR *szCatalogName,
SQLSMALLINT cbCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR *szSchemaName, SQLCHAR *szSchemaName,
SQLSMALLINT cbSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR *szTableName, SQLCHAR *szTableName,
SQLSMALLINT cbTableName); SQLSMALLINT cbTableName);
SQLRETURN SQLDrivers( SQLRETURN SQL_API SQLDrivers(
SQLHENV henv, SQLHENV henv,
SQLUSMALLINT fDirection, SQLUSMALLINT fDirection,
SQLCHAR *szDriverDesc, SQLCHAR *szDriverDesc,
SQLSMALLINT cbDriverDescMax, SQLSMALLINT cbDriverDescMax,
SQLSMALLINT *pcbDriverDesc, SQLSMALLINT *pcbDriverDesc,
SQLCHAR *szDriverAttributes, SQLCHAR *szDriverAttributes,
SQLSMALLINT cbDrvrAttrMax, SQLSMALLINT cbDrvrAttrMax,
SQLSMALLINT *pcbDrvrAttr); SQLSMALLINT *pcbDrvrAttr);
SQLRETURN SQLBindParameter( SQLRETURN SQL_API SQLBindParameter(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLUSMALLINT ipar, SQLUSMALLINT ipar,
SQLSMALLINT fParamType, SQLSMALLINT fParamType,
SQLSMALLINT fCType, SQLSMALLINT fCType,
SQLSMALLINT fSqlType, SQLSMALLINT fSqlType,
SQLULEN cbColDef, SQLULEN cbColDef,
SQLSMALLINT ibScale, SQLSMALLINT ibScale,
SQLPOINTER rgbValue, SQLPOINTER rgbValue,
SQLLEN cbValueMax, SQLLEN cbValueMax,
SQLLEN *pcbValue); SQLLEN *pcbValue);
skipping to change at line 1979 skipping to change at line 2039
#define SQL_YEAR_TO_MONTH SQL_CODE_YEAR_TO_MON TH #define SQL_YEAR_TO_MONTH SQL_CODE_YEAR_TO_MON TH
#define SQL_DAY_TO_HOUR SQL_CODE_DAY _TO_HOUR #define SQL_DAY_TO_HOUR SQL_CODE_DAY _TO_HOUR
#define SQL_DAY_TO_MINUTE SQL_CODE_DAY_TO_MINU TE #define SQL_DAY_TO_MINUTE SQL_CODE_DAY_TO_MINU TE
#define SQL_DAY_TO_SECOND SQL_CODE_DAY_TO_SECO ND #define SQL_DAY_TO_SECOND SQL_CODE_DAY_TO_SECO ND
#define SQL_HOUR_TO_MINUTE SQL_CODE_HOUR_TO_MIN UTE #define SQL_HOUR_TO_MINUTE SQL_CODE_HOUR_TO_MIN UTE
#define SQL_HOUR_TO_SECOND SQL_CODE_HOUR_TO_SEC OND #define SQL_HOUR_TO_SECOND SQL_CODE_HOUR_TO_SEC OND
#define SQL_MINUTE_TO_SECOND SQL_CODE_MINUTE_TO_SECOND #define SQL_MINUTE_TO_SECOND SQL_CODE_MINUTE_TO_SECOND
#endif /* ODBC_STD */ #endif /* ODBC_STD */
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
SQLRETURN SQLAllocHandleStd( SQLRETURN SQL_API SQLAllocHandleStd(
SQLSMALLINT fHandleType, SQLSMALLINT fHandleType,
SQLHANDLE hInput, SQLHANDLE hInput,
SQLHANDLE *phOutput); SQLHANDLE *phOutput);
#endif #endif
/* Deprecated defines from prior versions of ODBC */ /* Deprecated defines from prior versions of ODBC */
#define SQL_DATABASE_NAME 16 /* Use SQLGetConnectOption/SQ L_CURRENT_QUALIFIER */ #define SQL_DATABASE_NAME 16 /* Use SQLGetConnectOption/SQ L_CURRENT_QUALIFIER */
#define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR #define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR
#define SQL_FETCH_PREV SQL_FETCH_PRIOR #define SQL_FETCH_PREV SQL_FETCH_PRIOR
#define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER #define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER
skipping to change at line 2006 skipping to change at line 2066
#define SQL_CR_PRESERVE SQL_CB_PRESERVE #define SQL_CR_PRESERVE SQL_CB_PRESERVE
/* SQL_FETCH_RESUME is not supported by 2.0+ drivers /* SQL_FETCH_RESUME is not supported by 2.0+ drivers
#define SQL_FETCH_RESUME 7 #define SQL_FETCH_RESUME 7
*/ */
#define SQL_SCROLL_FORWARD_ONLY 0L /*-SQL_CURSOR_FORWARD_ONLY */ #define SQL_SCROLL_FORWARD_ONLY 0L /*-SQL_CURSOR_FORWARD_ONLY */
#define SQL_SCROLL_KEYSET_DRIVEN (-1L) /*-SQL_CURSOR_KEYSET_DRIVEN * / #define SQL_SCROLL_KEYSET_DRIVEN (-1L) /*-SQL_CURSOR_KEYSET_DRIVEN * /
#define SQL_SCROLL_DYNAMIC (-2L) /*-SQL_CURSOR_DYNAMIC */ #define SQL_SCROLL_DYNAMIC (-2L) /*-SQL_CURSOR_DYNAMIC */
#define SQL_SCROLL_STATIC (-3L) /*-SQL_CURSOR_STATIC */ #define SQL_SCROLL_STATIC (-3L) /*-SQL_CURSOR_STATIC */
/* Deprecated functions from prior versions of ODBC */ /* Deprecated functions from prior versions of ODBC */
SQLRETURN SQLSetScrollOptions( /* Use SQLSetStmtOptions */ SQLRETURN SQL_API SQLSetScrollOptions( /* Use SQLSetStmtOptions */
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLUSMALLINT fConcurrency, SQLUSMALLINT fConcurrency,
SQLLEN crowKeyset, SQLLEN crowKeyset,
SQLUSMALLINT crowRowset); SQLUSMALLINT crowRowset);
/* Tracing section */ /*!
* \defgroup Tracing.
#define TRACE_VERSION 1000 /* Version of trace *
API */ * unixODBC implements a slight variation of the tracing mecha
nism used
* on MS platforms. The unixODBC method loses the ability to p
roduce trace
* output for invalid handles but gains the following;
*
* - better concurrency
* - allows tracing to be turned on/off and configured at fine
r granularity
* - hopefully; better performance
*
* unixODBC provides a cross-platform helper library called 't
race' and an
* example/default trace plugin called 'odbctrac'. Those writi
ng an ODBC
* driver can use the 'trace' helper library (a static library
). Those wanting
* to create custom trace output can implement a different ver
sion of the
* 'odbctrac' plugin.
*
* The text file driver (odbctxt) included with unixODBC is an
example of a
* driver using the 'trace' helper library.
*
* The 'trace' library and the example plugin 'odbctrac' are d
esigned to be
* portable on all platforms where unixODBC is available and o
n MS platforms.
* This will allow drivers using 'trace' and 'odbctrac' plugin
to equilly
* portable. On MS platforms - this compliments traditional tr
acing (mostly
* just used by the Driver Manager).
*
* \sa trace
* odbctxt
* odbctrac
*/
/*@{*/
#define TRACE_VERSION 1000 /*!< Ver
sion of trace API */
#ifdef UNICODE #ifdef UNICODE
RETCODE TraceOpenLogFile(LPWSTR,LPWSTR,DWORD); /* open a tr RETCODE TraceOpenLogFile(SQLPOINTER,LPWSTR,LPWSTR,DWORD); /*!< open a
ace log file */ trace log file */
#endif
#ifdef __cplusplus
RETCODE TraceCloseLogFile();
/* Request to close a trace log */
#else #else
RETCODE TraceCloseLogFile(VOID); /* Request to close a trace log */ RETCODE TraceOpenLogFile(SQLPOINTER,LPSTR,LPSTR,DWORD); /*!< open a trace log file */
#endif #endif
VOID TraceReturn(RETCODE,RETCODE); /* Processes trace a RETCODE TraceCloseLogFile(SQLPOINTER);
fter FN is called */ /*!< Request to close a trace log */
SQLRETURN TraceReturn(SQLPOINTER,SQLRETURN); /*!< Call to pr
oduce trace output upon function return. */
#ifdef __cplusplus #ifdef __cplusplus
DWORD TraceVersion(); /* Returns trace API version */ DWORD TraceVersion(); /*!< Returns trace API version */
#else #else
DWORD TraceVersion(VOID); /* Returns trace API version */ DWORD TraceVersion(VOID); /*!< Returns trace API version */
#endif #endif
/* Functions for Visual Studio Analyzer*/ /* Functions for Visual Studio Analyzer*/
/* to turn on/off tracing or VS events, call TraceVSControl by setting or c learing the following bits */ /* to turn on/off tracing or VS events, call TraceVSControl by setting or c learing the following bits */
#define TRACE_ON 0x00000001L #define TRACE_ON 0x00000001L
#define TRACE_VS_EVENT_ON 0x00000002L #define TRACE_VS_EVENT_ON 0x00000002L
RETCODE TraceVSControl(DWORD); RETCODE TraceVSControl(DWORD);
/* the flags in ODBC_VS_ARGS */ /* the flags in ODBC_VS_ARGS */
skipping to change at line 2063 skipping to change at line 2149
CHAR *szArg; CHAR *szArg;
}u1; }u1;
union { union {
WCHAR *wszCorrelation; WCHAR *wszCorrelation;
CHAR *szCorrelation; CHAR *szCorrelation;
}u2; }u2;
RETCODE RetCode; RETCODE RetCode;
} ODBC_VS_ARGS, *PODBC_VS_ARGS; } ODBC_VS_ARGS, *PODBC_VS_ARGS;
VOID FireVSDebugEvent(PODBC_VS_ARGS); VOID FireVSDebugEvent(PODBC_VS_ARGS);
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/*
* connection pooling retry times
*/
BOOL ODBCSetTryWaitValue ( DWORD dwValue );
#ifdef __cplusplus
DWORD ODBCGetTryWaitValue ( );
#else
DWORD ODBCGetTryWaitValue ( VOID );
#endif
#ifndef __SQLUCODE_H
#include "sqlucode.h"
#endif
#endif #endif
 End of changes. 50 change blocks. 
58 lines changed or deleted 173 lines changed or added


 sqltypes.h   sqltypes.h 
skipping to change at line 23 skipping to change at line 23
* This include makes no effort to be usefull on any platforms other * This include makes no effort to be usefull on any platforms other
* than Linux (with some exceptions for UNIX in general). * than Linux (with some exceptions for UNIX in general).
* *
* !!!DO NOT CONTAMINATE THIS FILE WITH NON-Linux CODE!!! * !!!DO NOT CONTAMINATE THIS FILE WITH NON-Linux CODE!!!
* *
*************************************************************/ *************************************************************/
#ifndef __SQLTYPES_H #ifndef __SQLTYPES_H
#define __SQLTYPES_H #define __SQLTYPES_H
/**************************** /****************************
* default to the 3.51 definitions. should define ODBCVER before here if yo u want an older set of defines * default to the 3.80 definitions. should define ODBCVER before here if yo u want an older set of defines
***************************/ ***************************/
#ifndef ODBCVER #ifndef ODBCVER
#define ODBCVER 0x0351 #define ODBCVER 0x0380
#endif #endif
/* /*
* if thi sis set, then use a 4 byte unicode definition, insteead of the 2 bye that MS use * if thi sis set, then use a 4 byte unicode definition, insteead of the 2 bye that MS use
*/ */
#ifdef SQL_WCHART_CONVERT #ifdef SQL_WCHART_CONVERT
/* /*
* Use this if you want to use the C/C++ portable definition of a wide cha r, wchar_t * Use this if you want to use the C/C++ portable definition of a wide cha r, wchar_t
* Microsoft hardcoded a definition of unsigned short which may not be co mpatible with * Microsoft hardcoded a definition of unsigned short which may not be co mpatible with
skipping to change at line 48 skipping to change at line 48
*/ */
#include <wchar.h> #include <wchar.h>
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
* this is defined by configure, but will not be on a normal application bu ild * this is defined by configure, but will not be on a normal application bu ild
* the install creates a unixodbc_conf.h file that contains the current bui ld settings
*/ */
#ifndef SIZEOF_LONG #ifndef SIZEOF_LONG_INT
# if defined(__alpha) || defined(__sparcv9) #include "unixodbc_conf.h"
# define SIZEOF_LONG 8
#else
# define SIZEOF_LONG 4
#endif #endif
#ifndef SIZEOF_LONG_INT
#error "Needs to know how big a long int is to continue!!!"
#endif #endif
/**************************** /****************************
* These make up for having no windows.h * These make up for having no windows.h
***************************/ ***************************/
#ifndef ALLREADY_HAVE_WINDOWS_TYPE #ifndef ALLREADY_HAVE_WINDOWS_TYPE
#define FAR #define FAR
#define CALLBACK #define CALLBACK
#ifdef __OS2__
#define SQL_API _System
#else
#define SQL_API #define SQL_API
#endif
#define BOOL int #define BOOL int
typedef void* HWND; typedef void* HWND;
typedef char CHAR; typedef char CHAR;
#ifdef UNICODE #ifdef UNICODE
/* /*
* NOTE: The Microsoft unicode define is only for apps that want to use TCH ARs and * NOTE: The Microsoft unicode define is only for apps that want to use TCH ARs and
* be able to compile for both unicode and non-unicode with the same sourc e. * be able to compile for both unicode and non-unicode with the same sourc e.
* This is not recommanded for linux applications and is not supported * This is not recommanded for linux applications and is not supported
* by the standard linux string header files. * by the standard linux string header files.
skipping to change at line 92 skipping to change at line 97
#else #else
typedef char TCHAR; typedef char TCHAR;
#endif #endif
#ifndef DONT_TD_VOID #ifndef DONT_TD_VOID
typedef void VOID; typedef void VOID;
#endif #endif
typedef unsigned short WORD; typedef unsigned short WORD;
#if (SIZEOF_LONG == 4) #if (SIZEOF_LONG_INT == 4)
typedef unsigned long DWORD; typedef unsigned long DWORD;
#else #else
typedef unsigned int DWORD; typedef unsigned int DWORD;
#endif #endif
typedef unsigned char BYTE; typedef unsigned char BYTE;
#ifdef SQL_WCHART_CONVERT #ifdef SQL_WCHART_CONVERT
typedef wchar_t WCHAR; typedef wchar_t WCHAR;
#else #else
typedef unsigned short WCHAR; typedef unsigned short WCHAR;
#endif #endif
typedef WCHAR* LPWSTR; typedef WCHAR* LPWSTR;
typedef const char* LPCSTR; typedef const char* LPCSTR;
typedef const WCHAR* LPCWSTR;
typedef TCHAR* LPTSTR; typedef TCHAR* LPTSTR;
typedef char* LPSTR; typedef char* LPSTR;
typedef DWORD* LPDWORD; typedef DWORD* LPDWORD;
typedef void* HINSTANCE; typedef void* HINSTANCE;
#endif #endif
/**************************** /****************************
* standard SQL* data types. use these as much as possible when using ODBC calls/vars * standard SQL* data types. use these as much as possible when using ODBC calls/vars
skipping to change at line 132 skipping to change at line 138
typedef unsigned char SQLDECIMAL; typedef unsigned char SQLDECIMAL;
typedef double SQLDOUBLE; typedef double SQLDOUBLE;
typedef double SQLFLOAT; typedef double SQLFLOAT;
#endif #endif
/* /*
* can't use a long it fails on 64 platforms * can't use a long it fails on 64 platforms
*/ */
/* /*
* I (Nick) have made these changes, to cope with the new 3.52 MS * Hopefully by now it should be safe to assume most drivers know about SQL
* changes for 64 bit ODBC, but looking at MS's spec they havn't LEN now
* finished it themself. For example, SQLBindCol now expects the * and the defaukt is now sizeof( SQLLEN ) = 8 on 64 bit platforms
* indicator variable to be a SQLLEN which then is a pointer to
* a 64 bit value. However the online book that comes with the
* headers, then goes on to describe the indicator_ptr in the
* descriptor record (which is set by SQLBindCol) as a pointer
* to a SQLINTEGER (32 bit). So I don't think its ready for the
* big time yet. Thats not to mention all the ODBC apps on 64 bit
* platforms that this would break...
*
* I have just discovered that on win64 sizeof(long) == 4, so its
* all smoke and mirrors...
* *
*/ */
#if (SIZEOF_LONG == 8) #if (SIZEOF_LONG_INT == 8)
#ifndef DO_YOU_KNOW_WHAT_YOUR_ARE_DOING #ifdef BUILD_LEGACY_64_BIT_MODE
typedef int SQLINTEGER; typedef int SQLINTEGER;
typedef unsigned int SQLUINTEGER; typedef unsigned int SQLUINTEGER;
#define SQLLEN SQLINTEGER #define SQLLEN SQLINTEGER
#define SQLULEN SQLUINTEGER #define SQLULEN SQLUINTEGER
#define SQLSETPOSIROW SQLUSMALLINT #define SQLSETPOSIROW SQLUSMALLINT
typedef SQLULEN SQLROWCOUNT; /*
typedef SQLULEN SQLROWSETSIZE; * These are not supprted on 64bit ODBC according to MS, removed, so use at
typedef SQLULEN SQLTRANSID; your peril
typedef SQLLEN SQLROWOFFSET; *
typedef SQLULEN SQLROWCOUNT;
typedef SQLULEN SQLROWSETSIZE;
typedef SQLULEN SQLTRANSID;
typedef SQLLEN SQLROWOFFSET;
*/
#else #else
typedef int SQLINTEGER; typedef int SQLINTEGER;
typedef unsigned int SQLUINTEGER; typedef unsigned int SQLUINTEGER;
typedef long SQLLEN; typedef long SQLLEN;
typedef unsigned long SQLULEN; typedef unsigned long SQLULEN;
typedef unsigned long SQLSETPOSIROW; typedef unsigned long SQLSETPOSIROW;
/* /*
* These are not supprted on 64bit ODBC according to MS * These are not supprted on 64bit ODBC according to MS, removed, so use at
* typedef SQLULEN SQLROWCOUNT; your peril
* typedef SQLULEN SQLROWSETSIZE; *
* typedef SQLULEN SQLTRANSID; typedef SQLULEN SQLTRANSID;
* typedef SQLLEN SQLROWOFFSET; typedef SQLULEN SQLROWCOUNT;
typedef SQLUINTEGER SQLROWSETSIZE;
typedef SQLLEN SQLROWOFFSET;
*/ */
#endif #endif
#else #else
typedef long SQLINTEGER; typedef long SQLINTEGER;
typedef unsigned long SQLUINTEGER; typedef unsigned long SQLUINTEGER;
#define SQLLEN SQLINTEGER #define SQLLEN SQLINTEGER
#define SQLULEN SQLUINTEGER #define SQLULEN SQLUINTEGER
#define SQLSETPOSIROW SQLUSMALLINT #define SQLSETPOSIROW SQLUSMALLINT
typedef SQLULEN SQLROWCOUNT; typedef SQLULEN SQLROWCOUNT;
typedef SQLULEN SQLROWSETSIZE; typedef SQLULEN SQLROWSETSIZE;
skipping to change at line 247 skipping to change at line 247
#endif #endif
/**************************** /****************************
* more basic data types to augment what windows.h provides * more basic data types to augment what windows.h provides
***************************/ ***************************/
#ifndef ALLREADY_HAVE_WINDOWS_TYPE #ifndef ALLREADY_HAVE_WINDOWS_TYPE
typedef unsigned char UCHAR; typedef unsigned char UCHAR;
typedef signed char SCHAR; typedef signed char SCHAR;
typedef SCHAR SQLSCHAR; typedef SCHAR SQLSCHAR;
#if (SIZEOF_LONG == 4) #if (SIZEOF_LONG_INT == 4)
typedef long int SDWORD; typedef long int SDWORD;
typedef unsigned long int UDWORD; typedef unsigned long int UDWORD;
#else #else
typedef int SDWORD; typedef int SDWORD;
typedef unsigned int UDWORD; typedef unsigned int UDWORD;
#endif #endif
typedef signed short int SWORD; typedef signed short int SWORD;
typedef unsigned short int UWORD; typedef unsigned short int UWORD;
typedef unsigned int UINT; typedef unsigned int UINT;
typedef signed long SLONG; typedef signed long SLONG;
skipping to change at line 366 skipping to change at line 366
} SQL_INTERVAL_STRUCT; } SQL_INTERVAL_STRUCT;
#endif #endif
#endif #endif
/**************************** /****************************
* *
***************************/ ***************************/
#if (ODBCVER >= 0x0300) #ifndef ODBCINT64
#if (SIZEOF_LONG == 8) # if (ODBCVER >= 0x0300)
# define ODBCINT64 long # if (SIZEOF_LONG_INT == 8)
# define UODBCINT64 unsigned long # define ODBCINT64 long
#else # define UODBCINT64 unsigned long
# ifdef HAVE_LONG_LONG # define ODBCINT64_TYPE "long"
# define ODBCINT64 long long # define UODBCINT64_TYPE "unsigned long"
# define UODBCINT64 unsigned long long
# else # else
# ifdef HAVE_LONG_LONG
# define ODBCINT64 long long
# define UODBCINT64 unsigned long long
# define ODBCINT64_TYPE "long long"
# define UODBCINT64_TYPE "unsigned long long"
# else
/* /*
* may fail in some cases, but what else can we do ? * may fail in some cases, but what else can we do ?
*/ */
struct __bigint_struct struct __bigint_struct
{ {
int hiword; int hiword;
unsigned int loword; unsigned int loword;
}; };
struct __bigint_struct_u struct __bigint_struct_u
{ {
unsigned int hiword; unsigned int hiword;
unsigned int loword; unsigned int loword;
}; };
# define ODBCINT64 struct __bigint_struct # define ODBCINT64 struct __bigint_struct
# define UODBCINT64 struct __bigint_struct_u # define UODBCINT64 struct __bigint_struct_u
# define ODBCINT64_TYPE "struct __bigint_struct"
# define UODBCINT64_TYPE "struct __bigint_struct_u"
# endif
# endif # endif
#endif #endif
#endif
#ifdef ODBCINT64 #ifdef ODBCINT64
typedef ODBCINT64 SQLBIGINT; typedef ODBCINT64 SQLBIGINT;
#endif #endif
#ifdef UODBCINT64 #ifdef UODBCINT64
typedef UODBCINT64 SQLUBIGINT; typedef UODBCINT64 SQLUBIGINT;
#endif #endif
#endif
/**************************** /****************************
* cursor and bookmark * cursor and bookmark
***************************/ ***************************/
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
#define SQL_MAX_NUMERIC_LEN 16 #define SQL_MAX_NUMERIC_LEN 16
typedef struct tagSQL_NUMERIC_STRUCT typedef struct tagSQL_NUMERIC_STRUCT
{ {
SQLCHAR precision; SQLCHAR precision;
SQLSCHAR scale; SQLSCHAR scale;
 End of changes. 19 change blocks. 
44 lines changed or deleted 56 lines changed or added


 sqlucode.h   sqlucode.h 
skipping to change at line 35 skipping to change at line 35
#define SQL_SQLSTATE_SIZEW 10 /* size of SQLSTATE for unicode */ #define SQL_SQLSTATE_SIZEW 10 /* size of SQLSTATE for unicode */
/* UNICODE versions */ /* UNICODE versions */
SQLRETURN SQL_API SQLColAttributeW( SQLRETURN SQL_API SQLColAttributeW(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLUSMALLINT iCol, SQLUSMALLINT iCol,
SQLUSMALLINT iField, SQLUSMALLINT iField,
SQLPOINTER pCharAttr, SQLPOINTER pCharAttr,
SQLSMALLINT cbCharAttrMax, SQLSMALLINT cbCharAttrMax,
SQLSMALLINT *pcbCharAttr, SQLSMALLINT *pcbCharAttr,
SQLPOINTER pNumAttr); SQLLEN *pNumAttr);
SQLRETURN SQL_API SQLColAttributesW( SQLRETURN SQL_API SQLColAttributesW(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLUSMALLINT icol, SQLUSMALLINT icol,
SQLUSMALLINT fDescType, SQLUSMALLINT fDescType,
SQLPOINTER rgbDesc, SQLPOINTER rgbDesc,
SQLSMALLINT cbDescMax, SQLSMALLINT cbDescMax,
SQLSMALLINT *pcbDesc, SQLSMALLINT *pcbDesc,
SQLLEN *pfDesc); SQLLEN *pfDesc);
skipping to change at line 357 skipping to change at line 357
SQLSMALLINT *pcbDrvrAttr); SQLSMALLINT *pcbDrvrAttr);
/* ANSI versions */ /* ANSI versions */
SQLRETURN SQL_API SQLColAttributeA( SQLRETURN SQL_API SQLColAttributeA(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLSMALLINT iCol, SQLSMALLINT iCol,
SQLSMALLINT iField, SQLSMALLINT iField,
SQLPOINTER pCharAttr, SQLPOINTER pCharAttr,
SQLSMALLINT cbCharAttrMax, SQLSMALLINT cbCharAttrMax,
SQLSMALLINT *pcbCharAttr, SQLSMALLINT *pcbCharAttr,
SQLPOINTER pNumAttr); SQLLEN *pNumAttr);
SQLRETURN SQL_API SQLColAttributesA( SQLRETURN SQL_API SQLColAttributesA(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLUSMALLINT icol, SQLUSMALLINT icol,
SQLUSMALLINT fDescType, SQLUSMALLINT fDescType,
SQLPOINTER rgbDesc, SQLPOINTER rgbDesc,
SQLSMALLINT cbDescMax, SQLSMALLINT cbDescMax,
SQLSMALLINT *pcbDesc, SQLSMALLINT *pcbDesc,
SQLINTEGER *pfDesc); SQLLEN *pfDesc);
SQLRETURN SQL_API SQLConnectA( SQLRETURN SQL_API SQLConnectA(
SQLHDBC hdbc, SQLHDBC hdbc,
SQLCHAR *szDSN, SQLCHAR *szDSN,
SQLSMALLINT cbDSN, SQLSMALLINT cbDSN,
SQLCHAR *szUID, SQLCHAR *szUID,
SQLSMALLINT cbUID, SQLSMALLINT cbUID,
SQLCHAR *szAuthStr, SQLCHAR *szAuthStr,
SQLSMALLINT cbAuthStr); SQLSMALLINT cbAuthStr);
SQLRETURN SQL_API SQLDescribeColA( SQLRETURN SQL_API SQLDescribeColA(
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLUSMALLINT icol, SQLUSMALLINT icol,
SQLCHAR *szColName, SQLCHAR *szColName,
SQLSMALLINT cbColNameMax, SQLSMALLINT cbColNameMax,
SQLSMALLINT *pcbColName, SQLSMALLINT *pcbColName,
SQLSMALLINT *pfSqlType, SQLSMALLINT *pfSqlType,
SQLUINTEGER *pcbColDef, SQLULEN *pcbColDef,
SQLSMALLINT *pibScale, SQLSMALLINT *pibScale,
SQLSMALLINT *pfNullable); SQLSMALLINT *pfNullable);
SQLRETURN SQL_API SQLErrorA( SQLRETURN SQL_API SQLErrorA(
SQLHENV henv, SQLHENV henv,
SQLHDBC hdbc, SQLHDBC hdbc,
SQLHSTMT hstmt, SQLHSTMT hstmt,
SQLCHAR *szSqlState, SQLCHAR *szSqlState,
SQLINTEGER *pfNativeError, SQLINTEGER *pfNativeError,
SQLCHAR *szErrorMsg, SQLCHAR *szErrorMsg,
SQLSMALLINT cbErrorMsgMax, SQLSMALLINT cbErrorMsgMax,
SQLSMALLINT *pcbErrorMsg); SQLSMALLINT *pcbErrorMsg);
skipping to change at line 434 skipping to change at line 434
SQLINTEGER *pcbValue); SQLINTEGER *pcbValue);
SQLRETURN SQL_API SQLGetDescRecA( SQLRETURN SQL_API SQLGetDescRecA(
SQLHDESC hdesc, SQLHDESC hdesc,
SQLSMALLINT iRecord, SQLSMALLINT iRecord,
SQLCHAR *szName, SQLCHAR *szName,
SQLSMALLINT cbNameMax, SQLSMALLINT cbNameMax,
SQLSMALLINT *pcbName, SQLSMALLINT *pcbName,
SQLSMALLINT *pfType, SQLSMALLINT *pfType,
SQLSMALLINT *pfSubType, SQLSMALLINT *pfSubType,
SQLINTEGER *pLength, SQLLEN *pLength,
SQLSMALLINT *pPrecision, SQLSMALLINT *pPrecision,
SQLSMALLINT *pScale, SQLSMALLINT *pScale,
SQLSMALLINT *pNullable); SQLSMALLINT *pNullable);
SQLRETURN SQL_API SQLGetDiagFieldA( SQLRETURN SQL_API SQLGetDiagFieldA(
SQLSMALLINT fHandleType, SQLSMALLINT fHandleType,
SQLHANDLE handle, SQLHANDLE handle,
SQLSMALLINT iRecord, SQLSMALLINT iRecord,
SQLSMALLINT fDiagField, SQLSMALLINT fDiagField,
SQLPOINTER rgbDiagInfo, SQLPOINTER rgbDiagInfo,
skipping to change at line 728 skipping to change at line 728
#define SQLNativeSql SQLNativeSqlW #define SQLNativeSql SQLNativeSqlW
#define SQLPrimaryKeys SQLPrimaryKeysW #define SQLPrimaryKeys SQLPrimaryKeysW
#define SQLProcedureColumns SQLProcedureColumnsW #define SQLProcedureColumns SQLProcedureColumnsW
#define SQLProcedures SQLProceduresW #define SQLProcedures SQLProceduresW
#define SQLTablePrivileges SQLTablePrivilegesW #define SQLTablePrivileges SQLTablePrivilegesW
#define SQLDrivers SQLDriversW #define SQLDrivers SQLDriversW
#endif /* UNICODE */ #endif /* UNICODE */
#endif /* SQL_NOUNICODEMAP */ #endif /* SQL_NOUNICODEMAP */
#include <sqlext.h>
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#ifndef __SQLEXT_H
#include <sqlext.h>
#endif
#endif #endif
 End of changes. 12 change blocks. 
26 lines changed or deleted 29 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/