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

📄 cspublic.h

📁 SQLAPI C/C++ 连接Oracle 数据库!
💻 H
📖 第 1 页 / 共 4 页
字号:
/***	Sybase Open Client/Server **	Confidential Property of Sybase, Inc.**	Copyright  Sybase, Inc. 1992 - 2005**	All rights reserved*/#ifndef __CSPUBLIC_H__#define __CSPUBLIC_H__/*** Include the core header files. These files contain the defines and** data structures that are shared by all libraries.*/#ifndef __NO_INCLUDE__#include	<cstypes.h>#include	<sqlca.h>#endif /* __NO_INCLUDE__ *//********************************************************************************* Size defines used in client/server applications.*******************************************************************************//*** Define the maximum size of a fully qualified table name.*/#define	CS_OBJ_NAME		(CS_INT)((CS_MAX_NAME * 3) + 4)/*** The maximum number of bytes in the server message or error message** stored in the CS_SERVERMSG and CS_CLIENTMSG structures. If the total** message is longer than this, multiple structures will be passed to the** application program.*/#define CS_MAX_MSG		(CS_INT)1024/*** The maximum number of bytes in a Sybase timestamp.*/#define CS_TS_SIZE		(CS_INT)8/*** The maximum number of bytes in Sybase text pointers.*/#define CS_TP_SIZE		(CS_INT)16/*** The size of the sqlstate array in the CS_SERVERMSG and CS_CLIENTMSG** structures. Please note that this size is 2 bytes greater than what the** standard specifies. Users should look at only the first 6 bytes in** the array. That last 2 bytes are reserved to insure modulo 4 byte** structure alignment.*/#define CS_SQLSTATE_SIZE	(CS_INT)8/********************************************************************************* Defines passed into Open Client/Server APIs.*******************************************************************************//*** Define all the library versions currently supported. ** If compile flag 'CS_NO_LARGE_IDENTIFIERS' is set, we need to use** the old values for CS_VERSION_xxx for compatibility reasons.*/#ifdef CS_NO_LARGE_IDENTIFIERS#define CS_VERSION_100		(CS_INT)112#define CS_VERSION_110		(CS_INT)1100#define CS_VERSION_120		CS_VERSION_110#define CS_VERSION_125		(CS_INT)12500#define CS_VERSION_150		(CS_INT)15000#else#define CS_VERSION_100          (CS_INT)113#define CS_VERSION_110          (CS_INT)1101#define CS_VERSION_120          CS_VERSION_110#define CS_VERSION_125          (CS_INT)12501#define CS_VERSION_150          (CS_INT)15001#endif /* CS_NO_LARGE_IDENTIFIERS */#define CS_CURRENT_VERSION	CS_VERSION_150/*** Action flags used.** 	CS_CACHE currently only used by OMI apis*/#define CS_GET			(CS_INT)33#define CS_SET			(CS_INT)34#define CS_CLEAR		(CS_INT)35#define CS_INIT			(CS_INT)36#define CS_STATUS		(CS_INT)37#define CS_MSGLIMIT		(CS_INT)38#define	CS_SEND			(CS_INT)39#define	CS_SUPPORTED		(CS_INT)40#define CS_CACHE                (CS_INT)41 /*** Bind indicator values. These are preferred when passing data into** Client Library or Server Library, since they add the appropriate cast.*/#define CS_GOODDATA		(CS_SMALLINT)0#define CS_NULLDATA		(CS_SMALLINT)(-1)/*** Define ct_debug() operations.*/#define CS_SET_FLAG		(CS_INT)1700#define CS_CLEAR_FLAG		(CS_INT)1701#define CS_SET_DBG_FILE		(CS_INT)1702#define CS_SET_PROTOCOL_FILE	(CS_INT)1703/*** Define ct_debug() types of trace information.*/#define CS_DBG_ALL		(CS_INT)0x1#define CS_DBG_ASYNC		(CS_INT)0x2#define CS_DBG_ERROR		(CS_INT)0x4#define CS_DBG_MEM		(CS_INT)0x8#define CS_DBG_PROTOCOL		(CS_INT)0x10#define CS_DBG_PROTOCOL_STATES	(CS_INT)0x20#define CS_DBG_API_STATES	(CS_INT)0x40#define CS_DBG_DIAG		(CS_INT)0x80#define CS_DBG_NETWORK		(CS_INT)0x100#define CS_DBG_API_LOGCALL	(CS_INT)0x200/*** Cancel types.*/#define CS_CANCEL_CURRENT	(CS_INT)6000#define CS_CANCEL_ALL		(CS_INT)6001#define CS_CANCEL_ATTN		(CS_INT)6002#define CS_CANCEL_ABORT_NOTIF	(CS_INT)6003/*** Cursor fetch options. Currently these are supported within Open** Client, not yet in Open Server.*/#define CS_FIRST		(CS_INT)3000#define CS_NEXT			(CS_INT)3001#define CS_PREV			(CS_INT)3002#define CS_LAST			(CS_INT)3003#define CS_ABSOLUTE		(CS_INT)3004#define CS_RELATIVE		(CS_INT)3005/*** Op codes used in cs_calc().*/#define CS_ADD			(CS_INT)1#define CS_SUB			(CS_INT)2#define CS_MULT			(CS_INT)3#define CS_DIV			(CS_INT)4#define CS_ZERO			(CS_INT)5/*** The cs_dt_info() types.*/#define CS_MONTH		(CS_INT)7340#define CS_SHORTMONTH		(CS_INT)7341#define CS_DAYNAME		(CS_INT)7342#define CS_DATEORDER		(CS_INT)7343#define CS_12HOUR		(CS_INT)7344#define CS_DT_CONVFMT		(CS_INT)7345/*** The cs_strcmp() options.*/#define CS_COMPARE		(CS_INT)7440#define CS_SORT			(CS_INT)7441/*** Callback types.*/#define CS_COMPLETION_CB	(CS_INT)1#define CS_SERVERMSG_CB		(CS_INT)2#define CS_CLIENTMSG_CB		(CS_INT)3#define CS_NOTIF_CB		(CS_INT)4#define CS_ENCRYPT_CB		(CS_INT)5#define CS_CHALLENGE_CB		(CS_INT)6#define CS_DS_LOOKUP_CB		(CS_INT)7#define CS_SECSESSION_CB	(CS_INT)8#define	CS_SSLVALIDATE_CB	(CS_INT)9#define	CS_DONEPROC_CB		(CS_INT)10/*** To install a signal callback, the type needs to calculated as an** offset of the operating-system-specific signal number and the** following define. For example, to install a callback handler for a** SIGALRM signal, pass (CS_SIGNAL_CB + SIGALRM) to the ct_callback()** routine.*/#define CS_SIGNAL_CB		(CS_INT)100/*** Exit and close flags.*/#define CS_FORCE_EXIT		(CS_INT)300#define CS_FORCE_CLOSE		(CS_INT)301/*** ct_diag() and cs_diag() type flags.*/#define CS_CLIENTMSG_TYPE	(CS_INT)4700#define CS_SERVERMSG_TYPE	(CS_INT)4701#define CS_ALLMSG_TYPE		(CS_INT)4702#define SQLCA_TYPE		(CS_INT)4703#define SQLCODE_TYPE		(CS_INT)4704#define SQLSTATE_TYPE		(CS_INT)4705/*** Compute info types.*/#define CS_COMP_OP		(CS_INT)5350#define CS_COMP_ID		(CS_INT)5351#define CS_COMP_COLID		(CS_INT)5352#define CS_COMP_BYLIST		(CS_INT)5353#define CS_BYLIST_LEN		(CS_INT)5354/*** Compute info operators.*/#define CS_OP_SUM		(CS_INT)5370#define CS_OP_AVG		(CS_INT)5371#define CS_OP_COUNT		(CS_INT)5372#define CS_OP_MIN		(CS_INT)5373#define CS_OP_MAX		(CS_INT)5374/*** Browse types.*/#define CS_ISBROWSE		(CS_INT)9000#define CS_TABNUM		(CS_INT)9001#define CS_TABNAME		(CS_INT)9002/*** Result types from ct_results().*/#define CS_ROW_RESULT		(CS_INT)4040#define CS_CURSOR_RESULT	(CS_INT)4041#define CS_PARAM_RESULT		(CS_INT)4042#define CS_STATUS_RESULT	(CS_INT)4043#define CS_MSG_RESULT		(CS_INT)4044#define CS_COMPUTE_RESULT	(CS_INT)4045#define CS_CMD_DONE		(CS_INT)4046#define CS_CMD_SUCCEED		(CS_INT)4047#define CS_CMD_FAIL		(CS_INT)4048#define CS_ROWFMT_RESULT	(CS_INT)4049#define CS_COMPUTEFMT_RESULT	(CS_INT)4050#define CS_DESCRIBE_RESULT	(CS_INT)4051/*** Flags for getting result info using ct_res_info().*/#define CS_ROW_COUNT		(CS_INT)800#define CS_CMD_NUMBER		(CS_INT)801#define CS_NUM_COMPUTES		(CS_INT)802#define CS_NUMDATA		(CS_INT)803#define CS_ORDERBY_COLS		(CS_INT)804#define CS_NUMORDERCOLS		(CS_INT)805#define CS_MSGTYPE		(CS_INT)806#define CS_BROWSE_INFO		(CS_INT)807#define CS_TRANS_STATE		(CS_INT)808#define CS_TOKEN_TYPE		(CS_INT)809/*** Possible values for CS_TRANS_STATE.*/#define CS_TRAN_UNDEFINED	(CS_INT)0#define CS_TRAN_IN_PROGRESS	(CS_INT)1#define CS_TRAN_COMPLETED	(CS_INT)2#define CS_TRAN_FAIL		(CS_INT)3#define CS_TRAN_STMT_FAIL	(CS_INT)4/*** Define the invalid count that the application gets when** ct_res_info() is called at the wrong time.*/#define	CS_NO_COUNT		(CS_INT)-1/********************************************************************************* Commands in Open Client/Server APIs.*******************************************************************************//*** ct_command() command types.*/#define CS_LANG_CMD		(CS_INT)148#define CS_RPC_CMD		(CS_INT)149#define CS_MSG_CMD		(CS_INT)150#define CS_SEND_DATA_CMD	(CS_INT)151#define CS_PACKAGE_CMD		(CS_INT)152#define CS_SEND_BULK_CMD	(CS_INT)153/*** ct_cursor() command types.*/#define CS_CURSOR_DECLARE	(CS_INT)700#define CS_CURSOR_OPEN		(CS_INT)701#define CS_CURSOR_ROWS		(CS_INT)703#define CS_CURSOR_UPDATE	(CS_INT)704#define CS_CURSOR_DELETE	(CS_INT)705#define CS_CURSOR_CLOSE		(CS_INT)706#define CS_CURSOR_DEALLOC	(CS_INT)707#define CS_CURSOR_OPTION	(CS_INT)725/*** Open Server-specific cursor command types.*/#define CS_CURSOR_FETCH		(CS_INT)708#define CS_CURSOR_INFO		(CS_INT)709/*** ct_dyndesc() command types.*/#define CS_ALLOC		(CS_INT)710#define CS_DEALLOC		(CS_INT)711#define CS_USE_DESC		(CS_INT)712#define CS_GETCNT		(CS_INT)713#define CS_SETCNT		(CS_INT)714#define CS_GETATTR		(CS_INT)715#define CS_SETATTR		(CS_INT)716/*** ct_dynamic() command types.*/#define CS_PREPARE		(CS_INT)717#define CS_EXECUTE		(CS_INT)718#define CS_EXEC_IMMEDIATE	(CS_INT)719#define CS_DESCRIBE_INPUT	(CS_INT)720#define CS_DESCRIBE_INPUTIN	(CS_INT)320 /* CS_DESCRIBE_INPUT & CS_INPUT */#define CS_DESCRIBE_OUTPUT	(CS_INT)721#define CS_DYN_CURSOR_DECLARE	(CS_INT)722/*** ct_dynsqlda() arguments and actions*/#define CS_SQLDA_SYBASE		(CS_INT)729#define CS_GET_IN		(CS_INT)730#define CS_GET_OUT		(CS_INT)731#define CS_SQLDA_BIND		(CS_INT)732#define CS_SQLDA_PARAM		(CS_INT)733/*** Open Server-specific dynamic command types.*/#define CS_PROCNAME		(CS_INT)723#define CS_ACK			(CS_INT)724/*** ct_ds_objinfo() objinfo types.*/#define CS_OBJ_CLASSOID		(CS_INT)725#define CS_OBJ_DNAME		(CS_INT)726#define CS_OBJ_NUMATTR		(CS_INT)727#define CS_OBJ_ATRRIBUTE	(CS_INT)728/*** Command options*/#define CS_RECOMPILE		(CS_INT)188#define CS_NO_RECOMPILE		(CS_INT)189#define CS_BULK_INIT		(CS_INT)190#define CS_BULK_CONT		(CS_INT)191#define CS_BULK_DATA		(CS_INT)192#define CS_COLUMN_DATA		(CS_INT)193/*** Cursor options.*/#define CS_FOR_UPDATE		(CS_INT)0x0001#define CS_READ_ONLY		(CS_INT)0x0002#define CS_DYNAMIC		(CS_INT)0x0004	/* Open Server only */#define CS_RESTORE_OPEN		(CS_INT)0x0008	/* CT-Lib only */#define CS_MORE			(CS_INT)0x0010#define CS_END			(CS_INT)0x0020#define CS_IMPLICIT_CURSOR	(CS_INT)0x0040	/* Implicit, CT-Lib */#define CS_SCROLL_SENSITIVE	(CS_INT)0x0080	/* Scrollable cursor, reserved */#define CS_SCROLL_INSENSITIVE	(CS_INT)0x0100	/* Scrollable cursor, as default */#define CS_SCROLL_SEMISENSITIVE	(CS_INT)0x0200	/* Scrollable cursor */#define CS_SCROLL_KEYSETDRIVEN	(CS_INT)0x0400	/* Scrollable cursor, reserved */#define CS_SCROLL_CURSOR	(CS_INT)0x0800  /* "Default", internal */#define CS_NOSCROLL_INSENSITIVE	(CS_INT)0x1000	/* Non-scroll insensitive *//*** Sybase-defined message ids for CS_MSG_CMDs.*/#define CS_MSG_GETLABELS	(CS_INT)6#define CS_MSG_LABELS		(CS_INT)7#define CS_MSG_TABLENAME	(CS_INT)8#define CS_PARSE_TREE		(CS_INT)8710/*** Minimum and maximum user-defined message id for CS_MSG_CMDs.*/#define CS_USER_MSGID		(CS_INT)32768#define CS_USER_MAX_MSGID	(CS_INT)65535/*** Defines for sp_regwatch registered procedure*/#define CS_NOTIFY_ONCE          0x0002 /* one-time notification request. */#define CS_NOTIFY_ALWAYS        0x0004 /* permanent notification request. */#define CS_NOTIFY_WAIT          0x0020 /* blocking notification request. */#define CS_NOTIFY_NOWAIT        0x0040 /* non-blocking notification request. *//********************************************************************************* Open Client properties.*******************************************************************************//*** Properties that are used in *_props() functions.*/#define CS_USERNAME		(CS_INT)9100#define CS_PASSWORD		(CS_INT)9101#define CS_APPNAME		(CS_INT)9102#define CS_HOSTNAME		(CS_INT)9103#define CS_LOGIN_STATUS		(CS_INT)9104#define CS_TDS_VERSION		(CS_INT)9105#define CS_CHARSETCNV		(CS_INT)9106#define CS_PACKETSIZE		(CS_INT)9107#define CS_USERDATA		(CS_INT)9108#define CS_COMMBLOCK		(CS_INT)9109#define CS_NETIO		(CS_INT)9110#define CS_NOINTERRUPT		(CS_INT)9111#define CS_TEXTLIMIT		(CS_INT)9112#define CS_HIDDEN_KEYS		(CS_INT)9113

⌨️ 快捷键说明

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