⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cstypes.h

📁 SQLAPI C/C++ 连接Oracle 数据库!
💻 H
📖 第 1 页 / 共 3 页
字号:
/***	Sybase Open Client/Server **	Confidential Property of Sybase, Inc.**	Copyright  Sybase, Inc. 1992 - 2005**	All rights reserved*/#ifndef __CSTYPES_H__#define __CSTYPES_H__/*** This file defines basic error codes and data types used in all Open** Client/Server Products.*//*** Include the configuration header file. This file contains the defines and** type definitions that are platform/compiler specific.*/#ifndef __NO_INCLUDE__#include	<csconfig.h>#endif /* __NO_INCLUDE__ *//********************************************************************************* Return code defines used in client/server applications.*******************************************************************************//*** See the csconfig.h header file for the definition of CS_RETCODE.*//*** Define the core return codes.*/#define CS_SUCCEED		(CS_RETCODE)1#define CS_FAIL			(CS_RETCODE)0#define CS_MEM_ERROR		(CS_RETCODE)-1#define	CS_PENDING		(CS_RETCODE)-2#define	CS_QUIET		(CS_RETCODE)-3#define	CS_BUSY			(CS_RETCODE)-4#define	CS_INTERRUPT		(CS_RETCODE)-5#define CS_BLK_HAS_TEXT		(CS_RETCODE)-6#define CS_CONTINUE		(CS_RETCODE)-7#define CS_FATAL		(CS_RETCODE)-8#define CS_RET_HAFAILOVER	(CS_RETCODE)-9#define CS_UNSUPPORTED		(CS_RETCODE)-10/*** Define error offsets. All other CS_RETCODE error codes should be** based off of these values to avoid define conflicts.*/#define CS_CONV_ERR		(CS_RETCODE)(-100)#define CS_EXTERNAL_ERR		(CS_RETCODE)(-200)#define CS_INTERNAL_ERR		(CS_RETCODE)(-300)/* common library errors */#define CS_COMN_ERR		(CS_RETCODE)(-400)/*** Return code for a routine which was cancelled via ct_cancel().*/#define CS_CANCELED		(CS_RETCODE)(CS_EXTERNAL_ERR - 2)/*** Special returns for ct_fetch().*/#define CS_ROW_FAIL		(CS_RETCODE)(CS_EXTERNAL_ERR - 3)#define CS_END_DATA		(CS_RETCODE)(CS_EXTERNAL_ERR - 4)/*** Special return for ct_results().*/#define CS_END_RESULTS		(CS_RETCODE)(CS_EXTERNAL_ERR - 5)/*** Special return for ct_get_data().*/#define CS_END_ITEM		(CS_RETCODE)(CS_EXTERNAL_ERR - 6)/*** Special return for ct_diag().*/#define CS_NOMSG		(CS_RETCODE)(CS_EXTERNAL_ERR - 7)/*** Special return for ct_poll().*/#define CS_TIMED_OUT		(CS_RETCODE)(CS_EXTERNAL_ERR - 8)/*** Special returns for passthru().*/#define CS_PASSTHRU_EOM		(CS_RETCODE)(CS_EXTERNAL_ERR - 10)#define CS_PASSTHRU_MORE	(CS_RETCODE)(CS_EXTERNAL_ERR - 11)/*** Special return for ct_cancel().*/#define	CS_TRYING		(CS_RETCODE)(CS_EXTERNAL_ERR - 13)/*** Errors caused by external events (i.e. bad params supplied by user).*/#define CS_EBADPARAM		(CS_RETCODE)(CS_EXTERNAL_ERR - 14)#define CS_EBADLEN		(CS_RETCODE)(CS_EXTERNAL_ERR - 15)#define CS_ENOCNVRT		(CS_RETCODE)(CS_EXTERNAL_ERR - 16)/*** Special returns for the new ct_scroll_fetch() API. For Scrollable ** Cursor only.*/#define CS_SCROLL_CURSOR_ENDS	(CS_RETCODE)(CS_EXTERNAL_ERR - 17)#define CS_CURSOR_BEFORE_FIRST	(CS_RETCODE)(CS_EXTERNAL_ERR - 18)#define CS_CURSOR_AFTER_LAST	(CS_RETCODE)(CS_EXTERNAL_ERR - 19)/*** Return codes for conversion errors. These should be used in any user-** defined conversion routines that are install via cs_set_convert().*/#define CS_EOVERFLOW		(CS_RETCODE)(CS_CONV_ERR - 1)#define CS_EUNDERFLOW		(CS_RETCODE)(CS_CONV_ERR - 2)#define CS_EPRECISION		(CS_RETCODE)(CS_CONV_ERR - 3)#define CS_ESCALE		(CS_RETCODE)(CS_CONV_ERR - 4)#define CS_ESYNTAX		(CS_RETCODE)(CS_CONV_ERR - 5)#define CS_EFORMAT		(CS_RETCODE)(CS_CONV_ERR - 6)#define CS_EDOMAIN		(CS_RETCODE)(CS_CONV_ERR - 7)#define CS_EDIVZERO		(CS_RETCODE)(CS_CONV_ERR - 8)#define CS_ERESOURCE		(CS_RETCODE)(CS_CONV_ERR - 9)#define CS_ENULLNOIND		(CS_RETCODE)(CS_CONV_ERR - 10)#define CS_ETRUNCNOIND		(CS_RETCODE)(CS_CONV_ERR - 11)#define CS_ENOBIND		(CS_RETCODE)(CS_CONV_ERR - 12)#define CS_TRUNCATED		(CS_RETCODE)(CS_CONV_ERR - 13)#define CS_ESTYLE		(CS_RETCODE)(CS_CONV_ERR - 14)#define CS_EBADXLT      	(CS_RETCODE)(CS_CONV_ERR - 15)#define CS_ENOXLT       	(CS_RETCODE)(CS_CONV_ERR - 16)#define CS_USEREP		(CS_RETCODE)(CS_CONV_ERR - 17)/*** Error Severities. */#define CS_SV_INFORM		(CS_INT)0#define CS_SV_API_FAIL		(CS_INT)1#define CS_SV_RETRY_FAIL	(CS_INT)2#define CS_SV_RESOURCE_FAIL	(CS_INT)3#define CS_SV_CONFIG_FAIL	(CS_INT)4#define CS_SV_COMM_FAIL		(CS_INT)5#define CS_SV_INTERNAL_FAIL	(CS_INT)6#define CS_SV_FATAL		(CS_INT)7/********************************************************************************* Error numbers, and macros for extracting information from a ** Client-Library error number.**** Error numbers are broken down into four components:****	Layer		- Represents which layer is reporting the error.**	Origin		- Indicates where the error manifested itself. **	Severity	- How bad is the error?**	Number		- The actual layer specific error number being**			  reported.*******************************************************************************//*** The error message number.*/#if defined (SYB_LP64) || defined (SYB_LLP64) || defined (_AIX)typedef unsigned int CS_MSGNUM;#elsetypedef long CS_MSGNUM;#endif/*** The following macros are used to extract the components from a composite** error number.*/#define CS_LAYER(L)	(CS_MSGNUM) (((L) >> 24) & 0xff)#define CS_ORIGIN(O)	(CS_MSGNUM) (((O) >> 16) & 0xff)#define CS_SEVERITY(S)	(CS_MSGNUM) (((S) >> 8) & 0xff)#define CS_NUMBER(N)	(CS_MSGNUM) ((N) & 0xff)/*** The following are the possible values for cs_status field of** CHAR_ATTRIB structure defined in intl_nls.h*/# define        CS_STAT_DEFAULT           0x0000# define        CS_STAT_MULTIBYTE         0x0001# define        CS_STAT_SPACELAST         0x0002# define        CS_STAT_NONASCIISP        0x0004/********************************************************************************* Defines used in client/server applications.*******************************************************************************//*** The maximum localization name allowed. A four byte value is added (instead** of 1 byte) to provide space for null-termination and remain on a modulo 4** byte boundary.*/#define	CS_MAX_LOCALE		(CS_INT)(64 + 4)/*** The maximum column name length allowed. This maximum length does not** include a null-terminator. For declarations of character arrays with** the maximum possible size, including a null-terminator, CS_MAX_CHAR** should be used.**** If the compile flag CS_NO_LARGE_IDENTIFIERS has been set, we need to** use the old size for CS_MAX_NAME, defined as CS_MAX_NAME_NO_LRGID.*/#define CS_MAX_NAME_NO_LRGID	(CS_INT)(128 + 4)#if defined(CS_NO_LARGE_IDENTIFIERS)#define	CS_MAX_NAME		CS_MAX_NAME_NO_LRGID#else#define	CS_MAX_NAME		(CS_INT)(255)#endif /* CS_NO_LARGE_IDENTIFIERS *//*** The maximum password length allowed.*/#define CS_MAX_PASS		(CS_INT)(30)/*** The maximum number of characters in arrays, including a null-terminator.** Please note that this define does not correspond to any server definition** of lengths (particularly the length of the character data type, which ** is 255 bytes for the Sybase server).*/#define CS_MAX_CHAR		(CS_INT)256/*** Maximum string in Directory Services*/#define	CS_MAX_DS_STRING	(CS_INT)512/*** Maximum data length of numeric/decimal datatypes.*/#define	CS_MAX_NUMLEN		(CS_INT)33/*** To be true or not true.*/#define CS_TRUE			(CS_BOOL)1#define CS_FALSE		(CS_BOOL)0/*** Define basic default types.*/#define CS_NULLTERM		(CS_INT)(-9)#define CS_WILDCARD		(CS_INT)(-99)#define CS_NO_LIMIT		(CS_INT)(-9999)#define CS_UNUSED		(CS_INT)(-99999)/*** timeout values****	CS_NO_LIMIT		Resource will never expire.**	CS_UNEXPIRED		Resource did not expire.*/#define CS_UNEXPIRED		(CS_INT)(-999999)/*** Enumerate part of usertypes dataserver support.*/#define USER_UNICHAR_TYPE	(CS_INT)34#define USER_UNIVARCHAR_TYPE	(CS_INT)35/*** Enumerate what datatypes we support.*/#define CS_ILLEGAL_TYPE		(CS_INT)(-1)#define CS_CHAR_TYPE		(CS_INT)0#define CS_BINARY_TYPE		(CS_INT)1#define CS_LONGCHAR_TYPE	(CS_INT)2#define CS_LONGBINARY_TYPE	(CS_INT)3#define CS_TEXT_TYPE		(CS_INT)4#define CS_IMAGE_TYPE		(CS_INT)5#define CS_TINYINT_TYPE		(CS_INT)6#define CS_SMALLINT_TYPE	(CS_INT)7#define CS_INT_TYPE		(CS_INT)8#define CS_REAL_TYPE		(CS_INT)9#define CS_FLOAT_TYPE		(CS_INT)10#define CS_BIT_TYPE		(CS_INT)11#define CS_DATETIME_TYPE	(CS_INT)12#define CS_DATETIME4_TYPE	(CS_INT)13#define CS_MONEY_TYPE		(CS_INT)14#define CS_MONEY4_TYPE		(CS_INT)15#define CS_NUMERIC_TYPE		(CS_INT)16#define CS_DECIMAL_TYPE		(CS_INT)17#define CS_VARCHAR_TYPE		(CS_INT)18#define CS_VARBINARY_TYPE	(CS_INT)19#define CS_LONG_TYPE		(CS_INT)20#define CS_SENSITIVITY_TYPE	(CS_INT)21#define CS_BOUNDARY_TYPE	(CS_INT)22#define CS_VOID_TYPE		(CS_INT)23#define CS_USHORT_TYPE		(CS_INT)24#define CS_UNICHAR_TYPE		(CS_INT)25	#define CS_BLOB_TYPE		(CS_INT)26#define CS_DATE_TYPE		(CS_INT)27	#define CS_TIME_TYPE		(CS_INT)28	#define CS_UNITEXT_TYPE		(CS_INT)29	#define CS_BIGINT_TYPE		(CS_INT)30	#define CS_USMALLINT_TYPE	(CS_INT)31	#define CS_UINT_TYPE		(CS_INT)32	#define CS_UBIGINT_TYPE		(CS_INT)33	#define CS_XML_TYPE		(CS_INT)34/*** Define the minimum and maximum datatype values.*/#define CS_MIN_SYBTYPE		CS_CHAR_TYPE#define CS_MAX_SYBTYPE		CS_XML_TYPE/*** Define the number of datatypes that are supported by Sybase.*/#define CS_MAXSYB_TYPE		(CS_MAX_SYBTYPE + 1)/*** The minumum user-defined data type.*/#define CS_USER_TYPE		(CS_INT)100/*** Define the bit values used in the format element of the CS_DATAFMT** structure. The CS_FMT_JUSTIFY_RT flag exists for future use only.*/#define CS_FMT_UNUSED		(CS_INT)0x0#define CS_FMT_NULLTERM		(CS_INT)0x1#define CS_FMT_PADNULL		(CS_INT)0x2#define CS_FMT_PADBLANK		(CS_INT)0x4#define CS_FMT_JUSTIFY_RT	(CS_INT)0x8#define CS_FMT_STRIPBLANKS	(CS_INT)0x10#define CS_FMT_SAFESTR		(CS_INT)0x20/*** The following are bit values for the status field in the CS_DATAFMT** structure.** ** CS_HIDDEN		Set if this column would normally be hidden**			from the user.**** CS_KEY		Set if the column is a key column.**** CS_VERSION_KEY	Set if the column is part of the version key for**			the row.**** CS_NODATA		Not currently used in Open Client/Server.**** CS_UPDATABLE		Set if the column is an updatable cursor column.**** CS_CANBENULL		Set if the column can contain NULL values.**** CS_DESCIN		** CS_DESCOUT		Open Server-specific values for dynamic SQL.**** CS_INPUTVALUE	Set if the parameter is an input parameter value**			for a Client-Library command.**** CS_UPDATECOL		Set if the parameter is the name of a column in**			the update clause of a cursor declare command.**** CS_RETURN		Set if the parameter is a return parameter to**			an RPC command.**** CS_TIMESTAMP		Set if the column is a timestamp column.**** CS_NODEFAULT		Open Server-specific status values for RPC parameters.**** CS_IDENTITY		Set if the column is an identity column.***/#define CS_HIDDEN		(CS_INT)0x1#define CS_KEY			(CS_INT)0x2#define CS_VERSION_KEY		(CS_INT)0x4

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -