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

📄 ibase.h

📁 SQLAPI C/C++ 连接Oracle 数据库!
💻 H
📖 第 1 页 / 共 5 页
字号:
/* *	MODULE:		ibase.h *	DESCRIPTION:	OSRI entrypoints and defines * * The contents of this file are subject to the Interbase Public * License Version 1.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy * of the License at http://www.Interbase.com/IPL/ * * Software distributed under the License is distributed on an * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express * or implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code was created by Interbase Software Corporation * and its successors. Portions created by Borland/Inprise are * Copyright (C) 1992-1998 and 1999-2000 Borland/Inprise. Portions * created by InterBase Software Corporation are Copyright (C) * 1998-1999 InterBase Software Corporation. * * Copyright (C) 2000 InterBase Software Corporation * All Rights Reserved. * Contributor(s): ______________________________________. */#ifndef _JRD_IBASE_H_#define _JRD_IBASE_H_#ifndef HARBOR_MERGE#define HARBOR_MERGE#endif#define isc_version4#define  ISC_TRUE	1#define  ISC_FALSE	0#if !(defined __cplusplus)#define  ISC__TRUE	ISC_TRUE#define  ISC__FALSE	ISC_FALSE#endif#if (defined __osf__ && defined __alpha)#define  ISC_LONG	int#define  ISC_ULONG	unsigned int#else#define  ISC_LONG	long#define  ISC_ULONG	unsigned long#endif#define  ISC_USHORT	unsigned short#define  ISC_STATUS	long#define  DSQL_close     1#define  DSQL_drop      2/******************************************************************//* Define type, export and other stuff based on c/c++ and Windows *//******************************************************************/#if (defined(_MSC_VER) && defined(_WIN32)) || \    (defined(__BORLANDC__) && (defined(__WIN32__) || defined(__OS2__))) || \	(defined(__MINGW32__) && defined(__WIN32__))#define  ISC_FAR#define  ISC_EXPORT	__stdcall#define  ISC_EXPORT_VARARG	__cdecltypedef           __int64  ISC_INT64;typedef  unsigned __int64  ISC_UINT64;#define  ISC_INT64_DEFINED#else					/* Not Windows/NT */#if (defined(__IBMC__) && defined(__OS2__))#define  ISC_FAR#define  ISC_EXPORT	_System#define  ISC_EXPORT_VARARG	ISC_EXPORT#else					/* not IBM C Set++ for OS/2 */#if ( defined( _Windows) || defined( _WINDOWS))#define  ISC_FAR	__far#define  ISC_EXPORT     ISC_FAR __cdecl __loadds __export#define  ISC_EXPORT_VARARG	ISC_EXPORT#else					/* Not Windows/NT, OS/2 or Windows */#define  ISC_FAR#define  ISC_EXPORT#define  ISC_EXPORT_VARARG#endif					/* Windows and Not Windows/NT or OS/2 */#endif					/* IBM C Set++ for OS/2 */#endif   				/* Windows/NT *//*******************************************************************//* 64 bit Integers                                                 *//*******************************************************************/#ifndef  ISC_INT64_DEFINED              typedef           long long int  ISC_INT64;	typedef  unsigned long long int  ISC_UINT64;	#else#undef  ISC_INT64_DEFINED#endif/*******************************************************************//* Time & Date Support                                             *//*******************************************************************/#ifndef _ISC_TIMESTAMP_typedef long		ISC_DATE;typedef unsigned long	ISC_TIME;typedef struct {    ISC_DATE 	timestamp_date;    ISC_TIME	timestamp_time;} ISC_TIMESTAMP;#define _ISC_TIMESTAMP_			1#endif#define ISC_TIME_SECONDS_PRECISION          10000L#define ISC_TIME_SECONDS_PRECISION_SCALE    -4/*******************************************************************//* Blob id structure                                               *//*******************************************************************/typedef struct {    ISC_LONG		gds_quad_high;    unsigned ISC_LONG	gds_quad_low;} GDS_QUAD;#if !(defined __cplusplus)typedef GDS_QUAD	GDS__QUAD;#endif					/* !(defined __cplusplus) */#define	ISC_QUAD	GDS_QUAD#define	isc_quad_high	gds_quad_high#define	isc_quad_low	gds_quad_lowtypedef struct {    short       	array_bound_lower;    short       	array_bound_upper;} ISC_ARRAY_BOUND;typedef struct {    unsigned char       array_desc_dtype;    char                array_desc_scale;    unsigned short      array_desc_length;    char                array_desc_field_name [32];    char                array_desc_relation_name [32];    short               array_desc_dimensions;    short               array_desc_flags;    ISC_ARRAY_BOUND     array_desc_bounds [16];} ISC_ARRAY_DESC;typedef struct {    short               blob_desc_subtype;    short               blob_desc_charset;    short               blob_desc_segment_size;    unsigned char       blob_desc_field_name [32];    unsigned char       blob_desc_relation_name [32];} ISC_BLOB_DESC;/***************************//* Blob control structure  *//***************************/typedef struct isc_blob_ctl{    ISC_STATUS      (ISC_FAR *ctl_source)();	/* Source filter */    struct isc_blob_ctl ISC_FAR *ctl_source_handle; /* Argument to pass to source */						/* filter */    short		  ctl_to_sub_type;  	/* Target type */    short		  ctl_from_sub_type;	/* Source type */    unsigned short  	  ctl_buffer_length;	/* Length of buffer */    unsigned short  	  ctl_segment_length;  	/* Length of current segment */    unsigned short  	  ctl_bpb_length;	/* Length of blob parameter */					    	/* block */    char	  ISC_FAR *ctl_bpb;		/* Address of blob parameter */ 						/* block */    unsigned char ISC_FAR *ctl_buffer;		/* Address of segment buffer */    ISC_LONG     	  ctl_max_segment;	/* Length of longest segment */    ISC_LONG	 	  ctl_number_segments; 	/* Total number of segments */    ISC_LONG  		  ctl_total_length;  	/* Total length of blob */    ISC_STATUS	  ISC_FAR *ctl_status;		/* Address of status vector */    long		  ctl_data [8];	  	/* Application specific data */} ISC_FAR *ISC_BLOB_CTL;/***************************//* Blob stream definitions */ /***************************/typedef struct bstream {    void	ISC_FAR *bstr_blob;  	/* Blob handle */    char	ISC_FAR *bstr_buffer;	/* Address of buffer */    char	ISC_FAR *bstr_ptr;	/* Next character */    short	  bstr_length;		/* Length of buffer */    short	  bstr_cnt;		/* Characters in buffer */    char      	  bstr_mode;  		/* (mode) ? OUTPUT : INPUT */} BSTREAM;#define getb(p)	(--(p)->bstr_cnt >= 0 ? *(p)->bstr_ptr++ & 0377: BLOB_get (p))#define putb(x,p) (((x) == '\n' || (!(--(p)->bstr_cnt))) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x))))#define putbx(x,p) ((!(--(p)->bstr_cnt)) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x))))/***************************//* Dynamic SQL definitions *//***************************/ /******************************//* Declare the extended SQLDA *//******************************/typedef struct {    short	sqltype;		/* datatype of field */    short	sqlscale;		/* scale factor */    short	sqlsubtype;		/* datatype subtype - BLOBs & Text */					/* types only */    short	sqllen;			/* length of data area */    char  ISC_FAR *sqldata;		/* address of data */    short ISC_FAR *sqlind;		/* address of indicator variable */    short  	sqlname_length;		/* length of sqlname field */    char	sqlname [32];		/* name of field, name length + space */					/* for NULL */    short	relname_length;		/* length of relation name */    char	relname [32];		/* field's relation name + space for */					/* NULL */    short	ownname_length;		/* length of owner name */    char	ownname [32];		/* relation's owner name + space for */					/* NULL */    short	aliasname_length; 	/* length of alias name */    char	aliasname [32];		/* relation's alias name + space for */					/* NULL */} XSQLVAR;typedef struct {    short	version;		/* version of this XSQLDA */    char	sqldaid [8];		/* XSQLDA name field */    ISC_LONG	sqldabc;		/* length in bytes of SQLDA */    short	sqln;			/* number of fields allocated */    short	sqld;			/* actual number of fields */    XSQLVAR	sqlvar [1];		/* first field address */} XSQLDA;#define XSQLDA_LENGTH(n)	(sizeof (XSQLDA) + ((n)-1) * sizeof (XSQLVAR))#define SQLDA_VERSION1			1#define SQL_DIALECT_V5			1/* meaning is same as DIALECT_xsqlda */#define SQL_DIALECT_V6_TRANSITION	2/* flagging anything that is delimited                                            by double quotes as an error and                                            flagging keyword DATE as an error */#define SQL_DIALECT_V6			3/* supports SQL delimited identifier,                                            SQLDATE/DATE, TIME, TIMESTAMP,                                            CURRENT_DATE, CURRENT_TIME,                                            CURRENT_TIMESTAMP, and 64-bit exact                                            numeric type */#define SQL_DIALECT_CURRENT		SQL_DIALECT_V6/* latest IB DIALECT *//********************************//* InterBase Handle Definitions *//********************************/typedef void     ISC_FAR *isc_att_handle;typedef void     ISC_FAR *isc_blob_handle;typedef void     ISC_FAR *isc_db_handle;typedef void     ISC_FAR *isc_form_handle;typedef void     ISC_FAR *isc_req_handle;typedef void     ISC_FAR *isc_stmt_handle;typedef void     ISC_FAR *isc_svc_handle;typedef void     ISC_FAR *isc_tr_handle;typedef void     ISC_FAR *isc_win_handle;typedef void    (ISC_FAR *isc_callback)();typedef ISC_LONG	 isc_resv_handle;/***************************//* OSRI database functions *//***************************/#if defined(__cplusplus) || defined(__STDC__) || defined(_Windows) || \    (defined(_MSC_VER) && defined(WIN32)) || defined( _WINDOWS) || \    (defined(__BORLANDC__) && (defined(__WIN32__) || defined(__OS2__))) || \    (defined(__IBMC__) && defined(__OS2__)) || defined(AIX_PPC)#ifdef __cplusplusextern "C" {#endifISC_STATUS  ISC_EXPORT isc_attach_database (ISC_STATUS ISC_FAR *, 					    short, 					    char ISC_FAR *, 					    isc_db_handle ISC_FAR *, 					    short, 					    char ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_array_gen_sdl (ISC_STATUS ISC_FAR *, 					  ISC_ARRAY_DESC ISC_FAR *,					  short ISC_FAR *, 					  char ISC_FAR *, 					  short ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_array_get_slice (ISC_STATUS ISC_FAR *, 					    isc_db_handle ISC_FAR *, 					    isc_tr_handle ISC_FAR *, 					    ISC_QUAD ISC_FAR *, 					    ISC_ARRAY_DESC ISC_FAR *, 					    void ISC_FAR *, 					    ISC_LONG ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_array_lookup_bounds (ISC_STATUS ISC_FAR *, 						isc_db_handle ISC_FAR *, 						isc_tr_handle ISC_FAR *, 						char ISC_FAR *,						char ISC_FAR *, 						ISC_ARRAY_DESC ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_array_lookup_desc (ISC_STATUS ISC_FAR *, 					      isc_db_handle ISC_FAR *,					      isc_tr_handle ISC_FAR *, 					      char ISC_FAR *, 					      char ISC_FAR *, 					      ISC_ARRAY_DESC ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_array_set_desc (ISC_STATUS ISC_FAR *, 					   char ISC_FAR *, 					   char ISC_FAR *,					   short ISC_FAR *, 					   short ISC_FAR *, 					   short ISC_FAR *, 					   ISC_ARRAY_DESC ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_array_put_slice (ISC_STATUS ISC_FAR *, 					    isc_db_handle ISC_FAR *, 					    isc_tr_handle ISC_FAR *, 					    ISC_QUAD ISC_FAR *, 					    ISC_ARRAY_DESC ISC_FAR *, 					    void ISC_FAR *, 					    ISC_LONG ISC_FAR *);void       ISC_EXPORT isc_blob_default_desc (ISC_BLOB_DESC ISC_FAR *,                                        unsigned char ISC_FAR *,                                        unsigned char ISC_FAR *);ISC_STATUS ISC_EXPORT isc_blob_gen_bpb (ISC_STATUS ISC_FAR *,					ISC_BLOB_DESC ISC_FAR *,					ISC_BLOB_DESC ISC_FAR *,					unsigned short,					unsigned char ISC_FAR *,					unsigned short ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_blob_info (ISC_STATUS ISC_FAR *, 				      isc_blob_handle ISC_FAR *, 				      short, 				      char ISC_FAR *, 				      short, 				      char ISC_FAR *);ISC_STATUS ISC_EXPORT isc_blob_lookup_desc (ISC_STATUS ISC_FAR *,					    isc_db_handle ISC_FAR *,					    isc_tr_handle ISC_FAR *,					    unsigned char ISC_FAR *,					    unsigned char ISC_FAR *,					    ISC_BLOB_DESC ISC_FAR *,					    unsigned char ISC_FAR *);ISC_STATUS ISC_EXPORT isc_blob_set_desc (ISC_STATUS ISC_FAR *,					 unsigned char ISC_FAR *,					 unsigned char ISC_FAR *,					 short,					 short,					 short,					 ISC_BLOB_DESC ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_cancel_blob (ISC_STATUS ISC_FAR *, 				        isc_blob_handle ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_cancel_events (ISC_STATUS ISC_FAR *, 					  isc_db_handle ISC_FAR *, 					  ISC_LONG ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_close_blob (ISC_STATUS ISC_FAR *, 				       isc_blob_handle ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_commit_retaining (ISC_STATUS ISC_FAR *, 					     isc_tr_handle ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_commit_transaction (ISC_STATUS ISC_FAR *, 					       isc_tr_handle ISC_FAR *);ISC_STATUS  ISC_EXPORT isc_create_blob (ISC_STATUS ISC_FAR *, 

⌨️ 快捷键说明

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