odbtp.h   odbtp.h 
/* $Id: odbtp.h,v 1.29 2004/06/02 20:11:58 rtwitty Exp $ */ /* $Id: odbtp.h,v 1.33 2004/08/15 02:06:18 rtwitty Exp $ */
/* /*
odbtp - ODBTP client library odbtp - ODBTP client library
Copyright (C) 2002-2004 Robert E. Twitty <rtwitty@users.sourceforge.net > Copyright (C) 2002-2004 Robert E. Twitty <rtwitty@users.sourceforge.net >
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
skipping to change at line 24 skipping to change at line 24
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 U SA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 U SA
*/ */
#ifndef _ODBTP_H_ #ifndef _ODBTP_H_
#define _ODBTP_H_ #define _ODBTP_H_
#define ODBTP_LIB_VERSION "1.1.1" /* The below line must be uncommented for 64-bit systems, such as Tru64. */
/* #define _C_LONG_64_ 1 */
#define ODBTP_LIB_VERSION "1.1.2"
/* ODBTP Connection Level Request Codes */ /* ODBTP Connection Level Request Codes */
#define ODBTP_LOGIN 0x01 #define ODBTP_LOGIN 0x01
#define ODBTP_LOGOUT 0x02 #define ODBTP_LOGOUT 0x02
#define ODBTP_GETCONNID 0x03 #define ODBTP_GETCONNID 0x03
#define ODBTP_GETATTR 0x04 #define ODBTP_GETATTR 0x04
#define ODBTP_SETATTR 0x05 #define ODBTP_SETATTR 0x05
#define ODBTP_COMMIT 0x06 #define ODBTP_COMMIT 0x06
#define ODBTP_ROLLBACK 0x07 #define ODBTP_ROLLBACK 0x07
#define ODBTP_CANCELREQ 0x1F #define ODBTP_CANCELREQ 0x1F
skipping to change at line 97 skipping to change at line 100
/* ODB Data Definitions */ /* ODB Data Definitions */
#define ODB_BINARY (-2) #define ODB_BINARY (-2)
#define ODB_BIGINT (-25) #define ODB_BIGINT (-25)
#define ODB_UBIGINT (-27) #define ODB_UBIGINT (-27)
#define ODB_BIT (-7) #define ODB_BIT (-7)
#define ODB_CHAR 1 #define ODB_CHAR 1
#define ODB_DATE 91 #define ODB_DATE 91
#define ODB_DATETIME 93 #define ODB_DATETIME 93
#define ODB_DOUBLE 8 #define ODB_DOUBLE 8
#define ODB_FLOAT 8 #define ODB_FLOAT 8
#define ODB_GUID (-11)
#define ODB_INT (-16) #define ODB_INT (-16)
#define ODB_UINT (-18) #define ODB_UINT (-18)
#define ODB_NUMERIC 2 #define ODB_NUMERIC 2
#define ODB_REAL 7 #define ODB_REAL 7
#define ODB_SMALLINT (-15) #define ODB_SMALLINT (-15)
#define ODB_USMALLINT (-17) #define ODB_USMALLINT (-17)
#define ODB_TIME 92 #define ODB_TIME 92
#define ODB_TINYINT (-26) #define ODB_TINYINT (-26)
#define ODB_UTINYINT (-28) #define ODB_UTINYINT (-28)
#define ODB_WCHAR (-8) #define ODB_WCHAR (-8)
skipping to change at line 125 skipping to change at line 129
#define ODB_ATTR_FETCHROWCOUNT 1 #define ODB_ATTR_FETCHROWCOUNT 1
#define ODB_ATTR_TRANSACTIONS 2 #define ODB_ATTR_TRANSACTIONS 2
#define ODB_ATTR_DESCRIBEPARAMS 3 #define ODB_ATTR_DESCRIBEPARAMS 3
#define ODB_ATTR_UNICODESQL 4 #define ODB_ATTR_UNICODESQL 4
#define ODB_ATTR_FULLCOLINFO 5 #define ODB_ATTR_FULLCOLINFO 5
#define ODB_ATTR_QUERYTIMEOUT 6 #define ODB_ATTR_QUERYTIMEOUT 6
#define ODB_ATTR_OICLEVEL 7 #define ODB_ATTR_OICLEVEL 7
#define ODB_ATTR_TXNCAPABLE 8 #define ODB_ATTR_TXNCAPABLE 8
#define ODB_ATTR_MAPCHARTOWCHAR 9 #define ODB_ATTR_MAPCHARTOWCHAR 9
#define ODB_ATTR_VARDATASIZE 10 #define ODB_ATTR_VARDATASIZE 10
#define ODB_ATTR_CACHEPROCS 11
/* ODB String Attributes */ /* ODB String Attributes */
#define ODB_ATTR_STRING 0x10000 #define ODB_ATTR_STRING 0x10000
#define ODB_ATTR_DSN (0|ODB_ATTR_STRING) #define ODB_ATTR_DSN (0|ODB_ATTR_STRING)
#define ODB_ATTR_DRIVERNAME (1|ODB_ATTR_STRING) #define ODB_ATTR_DRIVERNAME (1|ODB_ATTR_STRING)
#define ODB_ATTR_DRIVERVER (2|ODB_ATTR_STRING) #define ODB_ATTR_DRIVERVER (2|ODB_ATTR_STRING)
#define ODB_ATTR_DRIVERODBCVER (3|ODB_ATTR_STRING) #define ODB_ATTR_DRIVERODBCVER (3|ODB_ATTR_STRING)
#define ODB_ATTR_DBMSNAME (4|ODB_ATTR_STRING) #define ODB_ATTR_DBMSNAME (4|ODB_ATTR_STRING)
#define ODB_ATTR_DBMSVER (5|ODB_ATTR_STRING) #define ODB_ATTR_DBMSVER (5|ODB_ATTR_STRING)
#define ODB_ATTR_SERVERNAME (6|ODB_ATTR_STRING) #define ODB_ATTR_SERVERNAME (6|ODB_ATTR_STRING)
skipping to change at line 153 skipping to change at line 158
#define ODB_DRIVER_ORACLE 4 #define ODB_DRIVER_ORACLE 4
#define ODB_DRIVER_SYBASE 5 #define ODB_DRIVER_SYBASE 5
#define ODB_DRIVER_MYSQL 6 #define ODB_DRIVER_MYSQL 6
/* ODB Transaction Types */ /* ODB Transaction Types */
#define ODB_TXN_NONE 0 #define ODB_TXN_NONE 0
#define ODB_TXN_READUNCOMMITTED 1 #define ODB_TXN_READUNCOMMITTED 1
#define ODB_TXN_READCOMMITTED 2 #define ODB_TXN_READCOMMITTED 2
#define ODB_TXN_REPEATABLEREAD 3 #define ODB_TXN_REPEATABLEREAD 3
#define ODB_TXN_SERIALIZABLE 4 #define ODB_TXN_SERIALIZABLE 4
#define ODB_TXN_DEFAULT 255
/* ODB ODBC Interface Conformace Levels */ /* ODB ODBC Interface Conformace Levels */
#define ODB_OIC_CORE 1 #define ODB_OIC_CORE 1
#define ODB_OIC_LEVEL1 2 #define ODB_OIC_LEVEL1 2
#define ODB_OIC_LEVEL2 3 #define ODB_OIC_LEVEL2 3
/* ODB Col Info Flags */ /* ODB Col Info Flags */
#define ODB_COLINFO_NOTNULL 0x0001 #define ODB_COLINFO_NOTNULL 0x0001
#define ODB_COLINFO_UNSIGNED 0x0002 #define ODB_COLINFO_UNSIGNED 0x0002
#define ODB_COLINFO_AUTONUMBER 0x0004 #define ODB_COLINFO_AUTONUMBER 0x0004
skipping to change at line 315 skipping to change at line 321
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* Odbtp Lib Data Types */ /* Odbtp Lib Data Types */
typedef int odbBOOL; typedef int odbBOOL;
typedef char odbCHAR; typedef char odbCHAR;
typedef unsigned char odbBYTE; typedef unsigned char odbBYTE;
typedef short odbSHORT; typedef short odbSHORT;
typedef unsigned short odbUSHORT; typedef unsigned short odbUSHORT;
#ifndef _C_LONG_64_
typedef long odbLONG; typedef long odbLONG;
typedef unsigned long odbULONG; typedef unsigned long odbULONG;
#else
typedef int odbLONG;
typedef unsigned int odbULONG;
#endif
typedef float odbFLOAT; typedef float odbFLOAT;
typedef double odbDOUBLE; typedef double odbDOUBLE;
#ifdef WIN32 /* Using WIN32 */ #ifdef WIN32 /* Using WIN32 */
typedef __int64 odbLONGLONG; typedef __int64 odbLONGLONG;
typedef unsigned __int64 odbULONGLONG; typedef unsigned __int64 odbULONGLONG;
#else /* Not Using WIN32 */ #else /* Not Using WIN32 */
#ifndef _C_LONG_64_
typedef long long odbLONGLONG; typedef long long odbLONGLONG;
typedef unsigned long long odbULONGLONG; typedef unsigned long long odbULONGLONG;
#else
typedef long odbLONGLONG;
typedef unsigned long odbULONGLONG;
#endif
#endif #endif
typedef struct typedef struct
{ {
odbSHORT sYear; odbSHORT sYear;
odbUSHORT usMonth; odbUSHORT usMonth;
odbUSHORT usDay; odbUSHORT usDay;
odbUSHORT usHour; odbUSHORT usHour;
odbUSHORT usMinute; odbUSHORT usMinute;
odbUSHORT usSecond; odbUSHORT usSecond;
skipping to change at line 563 skipping to change at line 579
odbPCSTR pszData, odbBOOL bFinal ); odbPCSTR pszData, odbBOOL bFinal );
odbBOOL odbSetParamTimestamp( odbHANDLE hQry, odbUSHORT usParam, odbBOOL odbSetParamTimestamp( odbHANDLE hQry, odbUSHORT usParam,
odbPTIMESTAMP ptsData, odbBOOL bFinal ) ; odbPTIMESTAMP ptsData, odbBOOL bFinal ) ;
odbBOOL odbSetParamUserData( odbHANDLE hQry, odbUSHORT usParam, odbBOOL odbSetParamUserData( odbHANDLE hQry, odbUSHORT usParam,
odbPVOID pVal ); odbPVOID pVal );
odbULONG odbSetReadTimeout( odbHANDLE hOdb, odbULONG ulTimeout ); odbULONG odbSetReadTimeout( odbHANDLE hOdb, odbULONG ulTimeout );
odbULONG odbSetSendTimeout( odbHANDLE hOdb, odbULONG ulTimeout ); odbULONG odbSetSendTimeout( odbHANDLE hOdb, odbULONG ulTimeout );
void odbSetUserData( odbHANDLE hOdb, odbPVOID pVal ); void odbSetUserData( odbHANDLE hOdb, odbPVOID pVal );
void odbSetUserDataLong( odbHANDLE hOdb, odbULONG ulVal ); void odbSetUserDataLong( odbHANDLE hOdb, odbULONG ulVal );
odbLONGLONG odbStrToLongLong( odbPCSTR pszStr ); odbLONGLONG odbStrToLongLong( odbPCSTR pszStr );
odbPTIMESTAMP odbStrToTimestamp( odbPTIMESTAMP ptsTime, odbPCSTR pszStr );
odbULONGLONG odbStrToULongLong( odbPCSTR pszStr ); odbULONGLONG odbStrToULongLong( odbPCSTR pszStr );
odbLONG odbTimestampToCTime( odbPTIMESTAMP ptsTime ); odbLONG odbTimestampToCTime( odbPTIMESTAMP ptsTime );
odbPSTR odbTimestampToStr( odbPSTR pszStr, odbPTIMESTAMP ptsTime,
odbBOOL bIncludeFraction );
odbPSTR odbULongLongToStr( odbULONGLONG ullVal, odbPSTR pszStrEnd ); odbPSTR odbULongLongToStr( odbULONGLONG ullVal, odbPSTR pszStrEnd );
odbBOOL odbUseRowCache( odbHANDLE hCon, odbBOOL bUse, odbULONG ulSize ); odbBOOL odbUseRowCache( odbHANDLE hCon, odbBOOL bUse, odbULONG ulSize );
void odbWinsockCleanup(void); void odbWinsockCleanup(void);
odbBOOL odbWinsockStartup(void); odbBOOL odbWinsockStartup(void);
#define odbFetchRowAbs( hQry, lRow ) odbFetchRowEx( (hQry), ODB_FETCH_ABS, (lRow) ) #define odbFetchRowAbs( hQry, lRow ) odbFetchRowEx( (hQry), ODB_FETCH_ABS, (lRow) )
#define odbFetchRowBookmark( hQry, lRowOffset ) odbFetchRowEx( (hQry), ODB_ FETCH_BOOKMARK, (lRowOffset) ) #define odbFetchRowBookmark( hQry, lRowOffset ) odbFetchRowEx( (hQry), ODB_ FETCH_BOOKMARK, (lRowOffset) )
#define odbFetchRowFirst( hQry ) odbFetchRowEx( (hQry), ODB_FETCH_FIRST, 0 ) #define odbFetchRowFirst( hQry ) odbFetchRowEx( (hQry), ODB_FETCH_FIRST, 0 )
#define odbFetchRowLaxt( hQry ) odbFetchRowEx( (hQry), ODB_FETCH_LAST, 0 ) #define odbFetchRowLast( hQry ) odbFetchRowEx( (hQry), ODB_FETCH_LAST, 0 )
#define odbFetchRowNext( hQry ) odbFetchRowEx( (hQry), ODB_FETCH_NEXT, 0 ) #define odbFetchRowNext( hQry ) odbFetchRowEx( (hQry), ODB_FETCH_NEXT, 0 )
#define odbFetchRowPrev( hQry ) odbFetchRowEx( (hQry), ODB_FETCH_PREV, 0 ) #define odbFetchRowPrev( hQry ) odbFetchRowEx( (hQry), ODB_FETCH_PREV, 0 )
#define odbFetchRowRel( hQry, lRowOffset ) odbFetchRowEx( (hQry), ODB_FETCH _REL, (lRowOffset) ) #define odbFetchRowRel( hQry, lRowOffset ) odbFetchRowEx( (hQry), ODB_FETCH _REL, (lRowOffset) )
#define odbFetchRowReread( hQry ) odbFetchRowEx( (hQry), ODB_FETCH_REREAD, 0 ) #define odbFetchRowReread( hQry ) odbFetchRowEx( (hQry), ODB_FETCH_REREAD, 0 )
#define odbRowAdd( hQry ) odbDoRowOperation( (hQry), ODB_ROW_ADD ) #define odbRowAdd( hQry ) odbDoRowOperation( (hQry), ODB_ROW_ADD )
#define odbRowBookmark( hQry ) odbDoRowOperation( (hQry), ODB_ROW_BOOKMARK ) #define odbRowBookmark( hQry ) odbDoRowOperation( (hQry), ODB_ROW_BOOKMARK )
#define odbRowDelete( hQry ) odbDoRowOperation( (hQry), ODB_ROW_DELETE ) #define odbRowDelete( hQry ) odbDoRowOperation( (hQry), ODB_ROW_DELETE )
#define odbRowLock( hQry ) odbDoRowOperation( (hQry), ODB_ROW_LOCK ) #define odbRowLock( hQry ) odbDoRowOperation( (hQry), ODB_ROW_LOCK )
#define odbRowRefresh( hQry ) odbDoRowOperation( (hQry), ODB_ROW_REFRESH ) #define odbRowRefresh( hQry ) odbDoRowOperation( (hQry), ODB_ROW_REFRESH )
 End of changes. 12 change blocks. 
3 lines changed or deleted 22 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/