📄 sql.h
字号:
/* warnings. */#define SQLA_RC_PREPWARN 25 /* Precompilation succeeded with */ /* warnings. */#define SQLA_RC_BINDERROR -1 /* Bind execution failed */#define SQLA_RC_PREPERROR -1 /* Precompilation failed */#define SQLA_RC_BAD_BINDNAME -2 /* Invalid bind file */#define SQLA_RC_BAD_DBNAME -3 /* Invalid database */#define SQLA_RC_BAD_MSGNAME -5 /* Invalid message file */#define SQLA_RC_BAD_FORMAT -6 /* Invalid format */#define SQLA_RC_OPEN_ERROR -31 /* Error opening list file */#define SQLA_RC_MFILE_OPEN_ERR -35 /* Error opening message file */#define SQLA_RC_FILE_NAME_BAD -36 /* Source file name is invalid */#define SQLA_RC_BAD_BNDFILE -39 /* Bind file corrupted */#define SQLA_RC_LIST_ERROR -40 /* Bind list errors */#define SQLA_RC_INTERRUPT -94 /* Interrupt */#define SQLA_RC_OSERROR -1086 /* System error */#define SQLA_RC_PREP_BIND_BUSY -1392 /* Prep/Bind already in use */#define SQLA_RC_OPTION_LEN_BAD -4903 /* Invalid parm. length */#define SQLA_RC_OPTION_PTR_BAD -4904 /* Invalid parm. ptr */#define SQLA_RC_OPTION_SIZE_BAD -4905 /* Invalid parm. size */#define SQLA_RC_OPTION_DATA_BAD -4917 /* Invalid parm. data */#define SQLA_RC_OPTION_INVALID -30104 /* Invalid option or option value */#define SQLA_RC_SDK_LICENSE -8005 /* No SDK/6000 license *//* Values used for the date/time format parameter of sqlabind() ** OBSOLETE *//* ** */#define SQL_FMT_DEF "DEF" /* FORMAT = Default for Country Code */#define SQL_FMT_USA "USA" /* FORMAT = USA */#define SQL_FMT_EUR "EUR" /* FORMAT = EUR */#define SQL_FMT_ISO "ISO" /* FORMAT = ISO */#define SQL_FMT_JIS "JIS" /* FORMAT = JIS */#define SQL_FMT_LOC "LOC" /* FORMAT = LOCAL *//* The size of a date/time format buffer */#define SQL_FMT_LENGTH 3/* Structures used system wide */#ifndef SQL_SQLDBCHAR_DEFN#define SQL_SQLDBCHAR_DEFN typedef unsigned short sqldbchar;#endif/******************************************************************************** sqlchar data structure** This structure is used to pass variable length data to the database manager.** ** Table: Fields in the SQLCHAR Structure** ----------------------------------------------------------------------------** |Field Name |Data Type |Description |** |---------------------|---------------|------------------------------------|** |LENGTH |SMALLINT |Length of the character string |** | | |pointed to by DATA. |** |---------------------|---------------|------------------------------------|** |DATA |CHAR(n) |An array of characters of length |** | | |LENGTH. |** |---------------------|---------------|------------------------------------|** ** COBOL Structure** ** This is not defined in any header file. The following is an example that** shows how to define the structure in COBOL:** ** * Replace maxlen with the appropriate value:** 01 SQLCHAR.** 49 SQLCHAR-LEN PIC S9(4) COMP-5.** 49 SQLCHAR-DATA PIC X(maxlen).*******************************************************************************/SQL_STRUCTURE sqlchar /* General-purpose VARCHAR for */ /* casting */{ short length; _SQLOLDCHAR data[1];};/******************************************************************************** sqlgraphic data structure*******************************************************************************/SQL_STRUCTURE sqlgraphic /* General-purpose VARGRAPHIC for */ /* casting */{ short length;#ifdef SQL_WCHART_CONVERT wchar_t data[1];#else sqldbchar data[1];#endif};/******************************************************************************** sqllob data structure** This structure is used to represent a LOB data type in a host** programming language.** ** Table: Fields in the sqllob structure** ----------------------------------------------------------------** |Field name |Data type |Description |** |--------------|-------------|---------------------------------|** |length |sqluint32 |Length in bytes of the data |** | | |parameter. |** |--------------|-------------|---------------------------------|** |data |char(1) |Data being passed in. |** |--------------|-------------|---------------------------------|** *******************************************************************************/SQL_STRUCTURE sqllob /* General-purpose LOB for casting */{ sqluint32 length; char data[1];};/******************************************************************************** sqldbclob data structure*******************************************************************************/SQL_STRUCTURE sqldbclob /* General-purpose DBCLOB for casting */{ sqluint32 length;#ifdef SQL_WCHART_CONVERT wchar_t data[1];#else sqldbchar data[1];#endif};/******************************************************************************** sqlfile data structure*******************************************************************************/SQL_STRUCTURE sqlfile /* File reference structure for LOBs */{ sqluint32 name_length; sqluint32 data_length; sqluint32 file_options; char name[255];};SQL_STRUCTURE sqlfile2 /* Extended file reference structure */ /* for LOBs */{ sqluint32 name_length; sqluint32 data_length; sqluint32 file_options; char name[255]; char reserved[5]; sqluint64 offset;};/* Values used for SQLVAR.SQLLEN with sqlfile structures */#define SQL_SQLFILE_LEN SQL_LOBFILE_LEN /* Length of an sqlfile LOB */ /* file host var */#define SQL_SQLFILE2_LEN 280 /* Length of an sqlfile2 LOB file */ /* host var *//* Values used for file_options in the sqlfile structures */#define SQL_FILE_READ 2 /* Input file to read from */#define SQL_FILE_CREATE 8 /* Output file - new file to be */ /* created */#define SQL_FILE_OVERWRITE 16 /* Output file - overwrite existing */ /* file or create a new file if it */ /* doesn't exist */#define SQL_FILE_APPEND 32 /* Output file - append to an */ /* existing file or create a new file */ /* if it doesn't exist *//* Structure used to store binder options when calling sqlabndr() *//* or sqlabndx(), or to store precompile options when calling *//* sqlaprep(), or to store rebind options when calling sqlarbnd(). */#define sqlbindopt sqloptions#ifndef SQL_BIND_OPTS/******************************************************************************** sqloptheader data structure** Table: Fields in the SQLOPTHEADER Structure** |----------------------------------------------------------------|** |Field Name|Data Type|Description |** |----------|---------|-------------------------------------------|** |ALLOCATED |INTEGER |Number of elements in the option array |** | | |of the sqlopt structure. |** |----------|---------|-------------------------------------------|** |USED |INTEGER |Number of elements in the option array |** | | |of the sqlopt structure actually used. |** | | |This is the number of option pairs (TYPE |** | | |and VAL) supplied. |** |----------|---------|-------------------------------------------|*******************************************************************************/SQL_STRUCTURE sqloptheader /* Header for sqlopt structure */{ sqluint32 allocated; /* Number of options allocated */ sqluint32 used; /* Number of options used */};/******************************************************************************** sqloptions data structure** Table: Fields in the SQLOPTIONS Structure** |----------------------------------------------------------------|** |Field Name| Data Type | Description
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -