00001 #line 1 "C:\\SAPDevelop\\DEV\\develop\\sys\\src\\SAPDB\\Interfaces\\SQLDBC\\SQLDBC_Types.h"
00002
00024 #ifndef SQLDBC_TYPES_H
00025 #define SQLDBC_TYPES_H
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #if !defined(BIT64)
00044
00045 #if defined(__osf__)
00046 # define BIT64 1
00047 #endif
00048
00049 #if (defined(__linux__) && defined(__ia64__))
00050 # define BIT64 1
00051 #endif
00052
00053 #if (defined(__linux__) && defined(__s390x__))
00054
00055 # define BIT64 1
00056 #endif
00057
00058 #if (defined(__linux__) && defined(__x86_64__) )
00059 # define BIT64 1
00060 #endif
00061
00062 #if (defined(__linux__) && defined(__powerpc64__))
00063
00064 # define BIT64 1
00065 #endif
00066
00067 #if defined(_WIN64)
00068 # define BIT64 1
00069 #endif
00070
00071 #if defined(_AIX) && defined(__64BIT__)
00072 # define BIT64 1
00073 #endif
00074
00075 #if (defined(sun) || defined(__sun))
00076 # include <sys/isa_defs.h>
00077 # if defined(_LP64)
00078 # define BIT64 1
00079 # endif
00080 #endif
00081
00082 #if (defined(__hpux)||defined(sinix)) && defined(__LP64__)
00083 # define BIT64 1
00084 #endif
00085
00086
00087 #endif
00088
00089
00090 #if !(defined(__linux__) && defined(__i386__)) && \
00091 !(defined(__linux__) && defined(__powerpc64__)) && \
00092 !(defined(__linux__) && defined(__s390x__)) && \
00093 !(defined(__linux__) && defined(__x86_64__)) && \
00094 !(defined(__linux__) && defined(__ia64__)) && \
00095 !defined(_WIN32) && \
00096 !((defined(sun) || defined(__sun)) && (defined(__sparc) || defined(__i386) || defined(__amd64))) &&\
00097 !defined(_AIX) && \
00098 !defined(__osf__) && \
00099 !defined(sinix) && \
00100 !defined(__hpux) && \
00101 !defined(__APPLE__)
00102 #error Unknown platform.
00103 #endif
00104
00105 #if (defined (_AIX) && __IBMCPP__ < 500) || ( (defined(sun) || defined(__sun)) && !defined(_BOOL) ) \
00106 || !defined (__cplusplus)
00107
00112 # define CPP_BOOL_NOT_IMPLEMENTED
00113 #endif
00114
00115 #if defined(_WIN32) \
00116 || (defined(__linux__) && !defined(__powerpc__) && !defined(__s390x__)) \
00117 || defined(__osf__) \
00118 || (defined(__sun) && (defined(__i386) || defined(__amd64)))
00119 # define SQLDBC_SWAPPED_UCS2
00120 #endif
00121
00122
00123 #ifdef SQLDBC_FEATURE_DECIMAL_OFF
00124 #undef SQLDBC_FEATURE_DECIMAL
00125 #else
00126 #ifndef SQLDBC_FEATURE_DECIMAL
00127
00129 #define SQLDBC_FEATURE_DECIMAL
00130 #endif
00131 #endif
00132
00133 #ifdef SQLDBC_FEATURE_OMS_ASCII_OFF
00134 #undef SQLDBC_FEATURE_OMS_ASCII
00135 #else
00136 #ifndef SQLDBC_FEATURE_OMS_ASCII
00137
00139 #define SQLDBC_FEATURE_OMS_ASCII
00140 #endif
00141 #endif
00142
00143 #ifdef SQLDBC_FEATURE_DECFLOAT_OFF
00144 #undef SQLDBC_FEATURE_DECFLOAT
00145 #else
00146 #ifndef SQLDBC_FEATURE_DECFLOAT
00147
00149 #define SQLDBC_FEATURE_DECFLOAT
00150 #endif
00151 #endif
00152
00153 #ifdef SQLDBC_FEATURE_LOB_KEEPALIVE_INDICATOR_OFF
00154 #undef SQLDBC_FEATURE_LOB_KEEPALIVE_INDICATOR
00155 #else
00156 #ifndef SQLDBC_FEATURE_LOB_KEEPALIVE_INDICATOR
00157
00159 #define SQLDBC_FEATURE_LOB_KEEPALIVE_INDICATOR
00160 #endif
00161 #endif
00162
00163 #ifdef CPP_BOOL_NOT_IMPLEMENTED
00164 #if defined(_WIN32) || defined(_AIX) || defined(__linux__) || defined(__osf__) \
00165 || defined(__hpux) || defined(sinix) || (defined(sun) || defined(__sun))
00166
00170 typedef unsigned char SQLDBC_Bool;
00175 typedef SQLDBC_Bool bool;
00176 #endif
00177 #else
00178 typedef bool SQLDBC_Bool;
00179 #endif
00180
00183 #define SQLDBC_TRUE ((SQLDBC_Bool)1)
00184
00186 #define SQLDBC_FALSE ((SQLDBC_Bool)0)
00187
00188 #if defined(_WIN64)
00189 typedef unsigned __int64 SQLDBC_ULong;
00190 typedef signed __int64 SQLDBC_Long;
00191 #else
00192
00196 typedef unsigned long SQLDBC_ULong;
00201 typedef signed long SQLDBC_Long;
00202 #endif
00203
00207 typedef unsigned char SQLDBC_Byte;
00208
00212 typedef SQLDBC_ULong SQLDBC_size_t;
00213
00217 typedef SQLDBC_Byte SQLDBC_UTF8;
00218
00221 typedef unsigned char SQLDBC_UInt1;
00224 typedef signed char SQLDBC_Int1;
00227 typedef unsigned short SQLDBC_UInt2;
00230 typedef signed short SQLDBC_Int2;
00233 typedef unsigned int SQLDBC_UInt4;
00236 typedef signed int SQLDBC_Int4;
00237
00238 #if defined(_WIN32) || defined(_WIN64)
00239
00241 typedef unsigned __int64 SQLDBC_UInt8;
00244 typedef signed __int64 SQLDBC_Int8;
00245 #else
00246
00248 typedef unsigned long long SQLDBC_UInt8;
00251 typedef long long SQLDBC_Int8;
00252 #endif
00253
00254 #if defined(BIT64)
00255 typedef SQLDBC_Int8 SQLDBC_Length;
00256 #else
00257
00262 typedef SQLDBC_Int4 SQLDBC_Length;
00263 #endif
00264
00267 typedef unsigned int SQLDBC_UInt;
00268
00271 typedef signed int SQLDBC_Int;
00272
00273 #ifdef SQLDBC_FEATURE_DECFLOAT
00274
00277 typedef unsigned char SQLDBC_DecFloat;
00278 #endif
00279
00283 #define SQLDBC_NULL_DATA (-1)
00284
00288 #define SQLDBC_DATA_AT_EXEC (-2)
00289
00293 #define SQLDBC_NTS (-3)
00294
00298 #define SQLDBC_NO_TOTAL (-4)
00299
00303 #define SQLDBC_DEFAULT_PARAM (-5)
00304
00308 #define SQLDBC_IGNORE (-6)
00309
00310 #ifdef SQLDBC_FEATURE_LOB_KEEPALIVE_INDICATOR
00311
00315 #define SQLDBC_LOB_KEEPALIVE (-7)
00316 #endif
00317
00322 #define SQLDBC_LEN_DATA_AT_EXEC_OFFSET (-100)
00323
00329 #define SQLDBC_LEN_DATA_AT_EXEC(length) (-(length)+SQLDBC_LEN_DATA_AT_EXEC_OFFSET)
00330
00331 #ifdef SQLDBC_FEATURE_DECIMAL
00332
00340 #define SQLDBC_LEN_DECIMAL(digits, fraction) (0x40000000 | ((digits & 0xFF) << 8) | (fraction & 0xFF))
00341
00350 #define SQLDBC_DECIMAL_LENGTH(digits, fraction) ((digits + 2) / 2)
00351
00352
00359 #define SQLDBC_DECIMAL_DIGITS(indicator) ( \
00360 ((indicator) & 0xFFFF0000) == 0x40000000 \
00361 ? ((indicator) & 0x0000FF00) >> 8 \
00362 : (-1) \
00363 )
00364
00371 #define SQLDBC_DECIMAL_FRACTION(indicator) ( \
00372 ((indicator) & 0xFFFF0000) == 0x40000000 \
00373 ? ((indicator) & 0x000000FF) \
00374 : (-1) \
00375 )
00376
00377 #endif
00378
00384 #ifndef __cplusplus
00385 typedef
00386 #endif
00387 enum SQLDBC_Retcode {
00388 SQLDBC_INVALID_OBJECT =-10909,
00389 SQLDBC_OK = 0,
00390 SQLDBC_NOT_OK = 1,
00392 SQLDBC_DATA_TRUNC =2,
00393 SQLDBC_OVERFLOW =3,
00394 SQLDBC_SUCCESS_WITH_INFO =4,
00395 SQLDBC_NO_DATA_FOUND =100,
00396 SQLDBC_NEED_DATA =99
00397 }
00398 #ifndef __cplusplus
00399 SQLDBC_Retcode
00400 #endif
00401 ;
00402
00409 #ifndef __cplusplus
00410 typedef
00411 #endif
00412 enum SQLDBC_Rowstatus
00413 {
00414 SQLDBC_EXECUTE_FAILED = -2,
00415 SQLDBC_SUCCESS_NO_INFO = -3,
00417 SQLDBC_DELETED = -4,
00418 SQLDBC_UPDATED = -5,
00419 SQLDBC_NOROW = -6,
00420 SQLDBC_ADDED = -7,
00421 SQLDBC_ROW_IGNORE = -8
00422 }
00423 #ifndef __cplusplus
00424 SQLDBC_Rowstatus
00425 #endif
00426 ;
00427
00428
00433 #ifndef __cplusplus
00434 typedef
00435 #endif
00436 enum SQLDBC_SQLMode {
00437 SQLDBC_INTERNAL =2,
00438 SQLDBC_ANSI =3,
00439 SQLDBC_DB2 =4,
00440 SQLDBC_ORACLE =5,
00441 SQLDBC_SAPR3 =6
00442 }
00443 #ifndef __cplusplus
00444 SQLDBC_SQLMode
00445 #endif
00446 ;
00447
00448 #ifdef __cplusplus
00449 class SQLDBC_StringEncodingType
00450 {
00451 public:
00452 enum Encoding {
00453 Unknown = 0,
00454 Ascii = 1,
00455 UCS2 = 2,
00456 UCS2Swapped = 3,
00457 UTF8 = 4
00458 };
00459 };
00460 typedef SQLDBC_StringEncodingType::Encoding SQLDBC_StringEncoding;
00461 #endif
00462 typedef enum SQLDBC_StringEncodingType_Encoding
00463 {
00464 SQLDBC_StringEncodingType_Encoding_Unknown = 0,
00465 SQLDBC_StringEncodingType_Encoding_Ascii = 1,
00466 SQLDBC_StringEncodingType_Encoding_UCS2 = 2,
00467 SQLDBC_StringEncodingType_Encoding_UCS2Swapped = 3,
00468 SQLDBC_StringEncodingType_Encoding_UTF8 = 4
00469 }SQLDBC_StringEncodingType_Encoding;
00470
00475 #define SQLDBC_StringEncodingUnknown SQLDBC_StringEncodingType::Unknown
00476
00481 #define SQLDBC_StringEncodingAscii SQLDBC_StringEncodingType::Ascii
00482
00487 #define SQLDBC_StringEncodingUCS2 SQLDBC_StringEncodingType::UCS2
00488
00493 #define SQLDBC_StringEncodingUCS2Swapped SQLDBC_StringEncodingType::UCS2Swapped
00494
00499 #if defined(SQLDBC_SWAPPED_UCS2)
00500 #define SQLDBC_StringEncodingUCS2Native SQLDBC_StringEncodingType::UCS2Swapped
00501 #else
00502 #define SQLDBC_StringEncodingUCS2Native SQLDBC_StringEncodingType::UCS2
00503 #endif
00504
00509 #define SQLDBC_StringEncodingUTF8 SQLDBC_StringEncodingType::UTF8
00510
00516 #ifndef __cplusplus
00517 typedef
00518 #endif
00519 enum SQLDBC_SQLType {
00520 SQLDBC_SQLTYPE_MIN = 0,
00521 SQLDBC_SQLTYPE_FIXED = SQLDBC_SQLTYPE_MIN,
00522 SQLDBC_SQLTYPE_FLOAT = 1,
00523 SQLDBC_SQLTYPE_CHA = 2,
00524 SQLDBC_SQLTYPE_CHE = 3,
00525 SQLDBC_SQLTYPE_CHB = 4,
00526 SQLDBC_SQLTYPE_ROWID = 5,
00527 SQLDBC_SQLTYPE_STRA = 6,
00528 SQLDBC_SQLTYPE_STRE = 7,
00529 SQLDBC_SQLTYPE_STRB = 8,
00530 SQLDBC_SQLTYPE_STRDB = 9,
00531 SQLDBC_SQLTYPE_DATE = 10,
00532 SQLDBC_SQLTYPE_TIME = 11,
00533 SQLDBC_SQLTYPE_VFLOAT = 12,
00534 SQLDBC_SQLTYPE_TIMESTAMP = 13,
00535 SQLDBC_SQLTYPE_UNKNOWN = 14,
00536 SQLDBC_SQLTYPE_NUMBER = 15,
00537 SQLDBC_SQLTYPE_NONUMBER = 16,
00538 SQLDBC_SQLTYPE_DURATION = 17,
00539 SQLDBC_SQLTYPE_DBYTEEBCDIC = 18,
00540 SQLDBC_SQLTYPE_LONGA = 19,
00541 SQLDBC_SQLTYPE_LONGE = 20,
00542 SQLDBC_SQLTYPE_LONGB = 21,
00543 SQLDBC_SQLTYPE_LONGDB = 22,
00544 SQLDBC_SQLTYPE_BOOLEAN = 23,
00545 SQLDBC_SQLTYPE_UNICODE = 24,
00546 SQLDBC_SQLTYPE_DTFILLER1 = 25,
00547 SQLDBC_SQLTYPE_DTFILLER2 = 26,
00548 SQLDBC_SQLTYPE_DTFILLER3 = 27,
00549 SQLDBC_SQLTYPE_VOID = 27,
00550 SQLDBC_SQLTYPE_DTFILLER4 = 28,
00551 SQLDBC_SQLTYPE_SMALLINT = 29,
00552 SQLDBC_SQLTYPE_INTEGER = 30,
00553 SQLDBC_SQLTYPE_VARCHARA = 31,
00554 SQLDBC_SQLTYPE_VARCHARE = 32,
00555 SQLDBC_SQLTYPE_VARCHARB = 33,
00556 SQLDBC_SQLTYPE_STRUNI = 34,
00557 SQLDBC_SQLTYPE_LONGUNI = 35,
00558 SQLDBC_SQLTYPE_VARCHARUNI = 36,
00559 SQLDBC_SQLTYPE_UDT = 37,
00560 SQLDBC_SQLTYPE_ABAPTABHANDLE = 38,
00561 SQLDBC_SQLTYPE_DWYDE = 39,
00562 SQLDBC_SQLTYPE_MAX = SQLDBC_SQLTYPE_DWYDE
00563 }
00564 #ifndef __cplusplus
00565 SQLDBC_SQLType
00566 #endif
00567 ;
00568
00573 #ifndef __cplusplus
00574 typedef
00575 #endif
00576 enum SQLDBC_HostType {
00577 SQLDBC_HOSTTYPE_MIN = 0,
00579 SQLDBC_HOSTTYPE_PARAMETER_NOTSET = 0,
00582 SQLDBC_HOSTTYPE_BINARY = 1,
00584 SQLDBC_HOSTTYPE_ASCII = 2,
00586 SQLDBC_HOSTTYPE_UTF8 = 4,
00588 SQLDBC_HOSTTYPE_UINT1 = 5,
00589 SQLDBC_HOSTTYPE_INT1 = 6,
00591 SQLDBC_HOSTTYPE_UINT2 = 7,
00592 SQLDBC_HOSTTYPE_INT2 = 8,
00594 SQLDBC_HOSTTYPE_UINT4 = 9,
00595 SQLDBC_HOSTTYPE_INT4 = 10,
00597 SQLDBC_HOSTTYPE_UINT8 = 11,
00598 SQLDBC_HOSTTYPE_INT8 = 12,
00600 SQLDBC_HOSTTYPE_DOUBLE = 13,
00601 SQLDBC_HOSTTYPE_FLOAT = 14,
00603 SQLDBC_HOSTTYPE_ODBCDATE = 15,
00604 SQLDBC_HOSTTYPE_ODBCTIME = 16,
00605 SQLDBC_HOSTTYPE_ODBCTIMESTAMP = 17,
00607 SQLDBC_HOSTTYPE_ODBCNUMERIC = 18,
00609 SQLDBC_HOSTTYPE_GUID = 19,
00611 SQLDBC_HOSTTYPE_UCS2 = 20,
00612 SQLDBC_HOSTTYPE_UCS2_SWAPPED= 21,
00613 #if defined(SQLDBC_SWAPPED_UCS2)
00614 SQLDBC_HOSTTYPE_UCS2_NATIVE = SQLDBC_HOSTTYPE_UCS2_SWAPPED,
00615 #else
00616 SQLDBC_HOSTTYPE_UCS2_NATIVE = SQLDBC_HOSTTYPE_UCS2,
00617 #endif
00618 SQLDBC_HOSTTYPE_BLOB = 22,
00619 SQLDBC_HOSTTYPE_ASCII_CLOB = 23,
00620 SQLDBC_HOSTTYPE_UTF8_CLOB = 24,
00621 SQLDBC_HOSTTYPE_UCS2_CLOB = 25,
00622 SQLDBC_HOSTTYPE_UCS2_SWAPPED_CLOB = 26,
00623 #if defined(SQLDBC_SWAPPED_UCS2)
00624 SQLDBC_HOSTTYPE_UCS2_NATIVE_CLOB = SQLDBC_HOSTTYPE_UCS2_SWAPPED_CLOB,
00625 #else
00626 SQLDBC_HOSTTYPE_UCS2_NATIVE_CLOB = SQLDBC_HOSTTYPE_UCS2_CLOB,
00627 #endif
00628 SQLDBC_HOSTTYPE_STREAM = 27,
00629 SQLDBC_HOSTTYPE_RAWHEX = 28,
00632 #ifdef SQLDBC_FEATURE_DECIMAL
00633 SQLDBC_HOSTTYPE_DECIMAL = 29,
00634 SQLDBC_HOSTTYPE_OMS_PACKED_8_3 = 30,
00635 SQLDBC_HOSTTYPE_OMS_PACKED_15_3 = 31,
00636 SQLDBC_HOSTTYPE_OMS_TIMESTAMP = 32,
00637 #endif
00638
00639 #ifdef SQLDBC_FEATURE_OMS_ASCII
00640 SQLDBC_HOSTTYPE_OMS_ASCII = 33,
00641 #endif
00642
00643 #ifdef SQLDBC_FEATURE_DECFLOAT
00644 SQLDBC_HOSTTYPE_DECFLOAT = 34,
00645 #endif
00646
00647 SQLDBC_HOSTTYPE_USERDEFINED = 100,
00649 SQLDBC_HOSTTYPE_MAX = SQLDBC_HOSTTYPE_USERDEFINED
00650 }
00651 #ifndef __cplusplus
00652 SQLDBC_HostType
00653 #endif
00654 ;
00655
00659 #ifndef __cplusplus
00660 typedef
00661 #endif
00662 enum SQLDBC_SQLWarningCode
00663 {
00664 SQLDBC_SQLWARNING_DATA_TRUNCATED = 1,
00665 SQLDBC_SQLWARNING_MAX
00666 }
00667 #ifndef __cplusplus
00668 SQLDBC_SQLWarningCode
00669 #endif
00670 ;
00671 #ifdef __cplusplus
00672 struct SQLDBC_DateTimeFormat
00673 {
00677 enum Format {
00678 None_C = 0,
00679 Normal_C = 1,
00680 Iso_C = 2,
00681 Usa_C = 3,
00682 Eur_C = 4,
00683 Jis_C = 5,
00684 OracleDate_C = 6,
00685 WasAnsiNowIsSameAsIso_C = 7,
00686 TsEur_C = 8
00687 };
00688 };
00689 #endif
00690
00694 typedef enum SQLDBC_DateTimeFormat_Format {
00695 SQLDBC_DateTimeFormat_Format_None_C = 0,
00696 SQLDBC_DateTimeFormat_Format_Normal_C = 1,
00697 SQLDBC_DateTimeFormat_Format_Iso_C = 2,
00698 SQLDBC_DateTimeFormat_Format_Usa_C = 3,
00699 SQLDBC_DateTimeFormat_Format_Eur_C = 4,
00700 SQLDBC_DateTimeFormat_Format_Jis_C = 5,
00701 SQLDBC_DateTimeFormat_Format_OracleDate_C = 6,
00702 SQLDBC_DateTimeFormat_Format_WasAnsiNowIsSameAsIso_C = 7,
00703 SQLDBC_DateTimeFormat_Format_TsEur_C = 8
00704 }SQLDBC_DateTimeFormat_Format;
00705
00706
00707 #ifndef __cplusplus
00708 typedef
00709 #endif
00710
00713 enum SQLDBC_SerialTag {
00714 SQLDBC_FIRST_INSERTED_SERIAL = 32768,
00715 SQLDBC_LAST_INSERTED_SERIAL = 32769
00716 }
00717 #ifndef __cplusplus
00718 SQLDBC_SerialTag;
00719 #else
00720 ;
00721 #endif
00722
00723 #ifndef __cplusplus
00724 typedef
00725 #endif
00726
00729 enum SQLDBC_ProfileCountValues {
00730
00731 SQLDBC_ALLOCATECOUNT = 0 ,
00732 SQLDBC_DEALLOCATECOUNT = 1 ,
00733 SQLDBC_CONNECTIONCOUNT = 2 ,
00734 SQLDBC_COMMITCOUNT = 3 ,
00735 SQLDBC_ROLLBACKCOUNT = 4 ,
00736 SQLDBC_SETISOLATIONCOUNT = 5 ,
00737 SQLDBC_SENDCOUNT = 6 ,
00738 SQLDBC_SENDSIZE = 7 ,
00739 SQLDBC_RECEIVESIZE = 8 ,
00740 SQLDBC_CANCELCOUNT = 9 ,
00741 SQLDBC_STATEMENTCOUNT = 10,
00742 SQLDBC_PREPAREDSTATEMENTCOUNT = 11,
00743 SQLDBC_NOTSELECTFETCHOPTIMIZED = 12,
00744 SQLDBC_DROPPARSEIDCOUNT = 13,
00745 SQLDBC_DROPCURSORCOUNT = 14,
00746 SQLDBC_DROPLONGDESCCOUNT = 15,
00747 SQLDBC_PREPARECOUNT = 16,
00748 SQLDBC_PARSEINFOHITCOUNT = 17,
00749 SQLDBC_PARSINFOMISSCOUNT = 18,
00750 SQLDBC_PARSEAGAINCOUNT = 19,
00751 SQLDBC_PARSEINFOSQUEEZECOUNT = 20,
00752 SQLDBC_EXECUTECOUNT = 21,
00753 SQLDBC_INSERTCOUNT = 22,
00754 SQLDBC_UPDATECOUNT = 23,
00755 SQLDBC_SELECTCOUNT = 24,
00756 SQLDBC_CALLDBPROCEDURECOUNT = 25,
00757 SQLDBC_DELETECOUNT = 26,
00758 SQLDBC_FETCHCOUNT = 27,
00759 SQLDBC_SQLERRORCOUNT = 28,
00760 SQLDBC_ROWNOTFOUNDCOUNT = 29,
00761 SQLDBC_FETCHROWCOUNT = 30,
00762 SQLDBC_DATAREADSIZE = 31,
00763 SQLDBC_DATAWRITESIZE = 32,
00764 SQLDBC_LONGDATAREADSIZE = 33,
00765 SQLDBC_LONGDATAWRITESIZE = 34,
00766 SQLDBC_PROFILE_MAX = 35
00767 }
00768 #ifndef __cplusplus
00769 SQLDBC_ProfileCountValues;
00770 #else
00771 ;
00772 #endif
00773
00774 #endif