📄 ocidef.h
字号:
** are invalid. ** ** ** EXAMPLE : ** ** Client provides - ** ** object_name - SCOTT.ACCOUNT_UPDATE@BOSTON ** total_elements - 100 ** ** ** ACCOUNT_UPDATE is an overloaded function with specification : ** ** type number_table is table of number index by binary_integer; ** table account (account_no number, person_id number, ** balance number(7,2)) ** table person (person_id number(4), person_nm varchar2(10)) ** ** function ACCOUNT_UPDATE (account number, ** person person%rowtype, amounts number_table, ** trans_date date) return accounts.balance%type; ** ** function ACCOUNT_UPDATE (account number, ** person person%rowtype, amounts number_table, ** trans_no number) return accounts.balance%type; ** ** ** Values returned - ** ** overload position argument level datatype length prec scale rad ** ------------------------------------------------------------------- ** 0 0 0 NUMBER 22 7 2 10 ** 0 1 ACCOUNT 0 NUMBER 22 0 0 0 ** 0 2 PERSON 0 RECORD 0 0 0 0 ** 0 2 PERSON_ID 1 NUMBER 22 4 0 10 ** 0 2 PERSON_NM 1 VARCHAR2 10 0 0 0 ** 0 3 AMOUNTS 0 TABLE 0 0 0 0 ** 0 3 1 NUMBER 22 0 0 0 ** 0 4 TRANS_NO 0 NUMBER 22 0 0 0 ** ** 1 0 0 NUMBER 22 7 2 10 ** 1 1 ACCOUNT 0 NUMBER 22 0 0 0 ** 1 2 PERSON 0 RECORD 0 0 0 0 ** 1 2 PERSON_ID 1 NUMBER 22 4 0 10 ** 1 2 PERSON_NM 1 VARCHAR2 10 0 0 0 ** 1 3 AMOUNTS 0 TABLE 0 0 0 0 ** 1 3 1 NUMBER 22 0 0 0 ** 1 4 TRANS_DATE 0 NUMBER 22 0 0 0 ** ** ** OCIDPR Argument Descriptions - ** ** ldadef - pointer to ldadef ** object_name - object name, synonyms are also accepted and will ** be translate, currently only procedure and function ** names are accepted, also NLS names are accepted. ** Currently, the accepted format of a name is ** [[part1.]part2.]part3[@dblink] (required) ** object_length - object name length (required) ** reserved1 - reserved for future use ** reserved1_length - reserved for future use ** reserved2 - reserved for future use ** reserved2_length - reserved for future use ** overload - array indicating overloaded procedure # (returned) ** position - array of argument positions, position 0 is a function ** return argument (returned) ** level - array of argument type levels, used to describe ** sub-datatypes of data structures like records ** and arrays (returned) ** argument_name - array of argument names, only returns first ** 30 characters of argument names, note storage ** for 30 characters is allocated by client (returned) ** argument_length - array of argument name lengths (returned) ** datatype - array of oracle datatypes (returned) ** default_supplied - array indicating parameter has default (returned) ** 0 = no default, 1 = default supplied ** in_out - array indicating if argument is IN or OUT (returned ** 0 = IN param, 1 = OUT param, 2 = IN/OUT param ** length - array of argument lengths (returned) ** precision - array of precisions (if number type)(returned) ** scale - array of scales (if number type)(returned) ** radix - array of radix (if number type)(returned) ** spare - array of spares. ** total_elements - size of arrays supplied by client (required), ** total number of elements filled (returned) *//*************************************//* DEFINING *//*************************************/sword ocidfi( /*_ struct csrdef *cursor, word pos, ub1 *buf, word bufl, word ftype, b2 *rc, word scale _*/ );sword ocidfn( /*_ struct csrdef *cursor, word pos, ub1 *buf, word bufl, word ftype, word scale, b2 *indp, oratext *fmt, word fmtl, word fmtt, ub2 *rl, ub2 *rc _*/ );sword ocidfnps( /*_ struct csrdef *cursor, ub1 opcode, word pos, ub1 *buf, sb4 bufl, word ftype, word scale, b2 *indp, oratext *fmt, sb4 fmtl, word fmtt, ub2 *rl, ub2 *rc, sb4 pv_skip, sb4 ind_skip, sb4 len_skip, sb4 rc_skip _*/ ); /* Define a user data buffer using upidfn ** cursor - pointer to csrdef ** pos - position of a field or exp in the select list of a query ** bfa/bfl - address and length of client-supplied storage to receive data ** ftype - user datatype ** scale - number of fractional digits for cobol packed decimals ** indp - place to store the length of the returned value. If returned ** value is: ** negative, the field fetched was NULL ** zero , the field fetched was same length or shorter than ** the buffer provided ** positive, the field fetched was truncated ** fmt - format string ** fmtl - length of format string, if -1 strlent(fmt) used ** rl - place to store column length after each fetch ** rc - place to store column error code after each fetch ** fmtt - fomat type */ /********************************//* PIECE INFORMATION GET/SET *//********************************/sword ocigetpi( /*_ struct csrdef *cursor, ub1 *piecep, dvoid **ctxpp, ub4 *iterp, ub4 *indexp _*/ );sword ocisetpi( /*_ struct csrdef *cursor, ub1 piece, dvoid *bufp, ub4 *lenp _*/ );/********************************//* EXECUTE *//********************************/sword ociexe( /*_ struct csrdef *cursor _*/ );sword ociexn( /*_ struct csrdef *cursor, word iters, word roff _*/ );sword ociefn( /*_ struct csrdef *cursor, ub4 nrows, word can, word exact _*/); /* ** ociexe - execute a cursor ** ociexn - execute a cursosr N times ** cursor - pointer to a csrdef ** iters - number of times to execute cursor ** roff - offset within the bind variable array at which to begin ** operations. *//*********************************//* FETCHING *//*********************************/sword ocifet( /*_ struct csrdef *cursor _*/ );sword ocifen( /*_ struct csrdef *cursor, word nrows _*/ ); /* ocifet - fetch the next row ** ocifen - fetch n rows ** cursor - pointer to csrdef ** nrows - number of rows to be fetched */sword ocilng(/*_ struct csrdef *cursor, word posit, ub1 *bfa, sb4 bfl, word dty, ub4 *rln, sb4 off _*/);/*********************************//* CONVERSION *//*********************************/sword ocic32( /*_ struct csrdef *cursor _*/ ); /* ** Convert selected version 3 return codes to the equivalent ** version 2 code. ** csrdef->csrrc is set to the converted code ** csrdef->csrft is set to v2 oracle statment type ** csrdef->csrrpc is set to the rows processed count ** csrdef->csrpeo is set to error postion ** ** cursor - pointer to csrdef */sword ocir32( /*_ struct csrdef *cursor, word retcode _*/ ); /* ** Convert selected version 3 return codes to the equivalent version 2 code. ** ** cursor - pointer to csrdef ** retcode - place to store the return code */VOID ociscn( /*_ word **arglst, char *mask_addr, word **newlst _*/ ); /* ** Convert call-by-ref to call-by-value: ** takes an arg list and a mask address, determines which args need ** conversion to a value, and creates a new list begging at the address ** of newlst. ** ** arglst - list of arguments ** mast_addr _ mask address determines args needing conversion ** newlst - new list of args */word ocistf ( /*_ word typ, word bufl, word rdig, oratext *fmt, struct csrdef *cursor, sword *err _*/ );/* Convert a packed decimal buffer length (bytes) and scale to a format** string of the form mm.+/-nn, where mm is the number of packed ** decimal digits, and nn is the scaling factor. A positive scale name ** nn digits to the rights of the decimal; a negative scale means nn zeros ** should be supplied to the left of the decimal.** bufl - length of the packed decimal buffer** rdig - number of fractional digits** fmt - pointer to a string holding the conversion format** cursor - pointer to csrdef ** err - pointer to word storing error code*/ /******************************************//* Non-blocking operations *//******************************************/sword ocinbs( /*_ ldadef *lda _*/ ); /* set a connection to non-blocking */sword ocinbt( /*_ ldadef *lda _*/ ); /* test if connection is non-blocking */sword ocinbc( /*_ ldadef *lda _*/ ); /* clear a connection to blocking */sword ocinlo( /*_ ldadef *lda, struct hstdef *hst, oratext *conn, sword connl, oratext *uid, sword uidl, oratext *psw, sword pswl, sword audit _*/ ); /* logon in non-blocking fashion *//* ocinlo allows an application to logon in non-blocking fashion.** lda - pointer to ldadef** hst - pointer to a 256 byte area, must be cleared to zero before call** conn - the database link (if specified @LINK in uid will be ignored)** connl - length of conn; if -1 strlen(conn) is used ** uid - user id [USER[/PASSWORD][@LINK]]** uidl - length of uid, if -1 strlen(uid) is used** psw - password string; ignored if specified in uid** pswl - length of psw, if -1 strlen(psw) is used** audit - is not supported; the only permissible value is 0*//***************************************************//* Procedure Declaration for Pro*C *//***************************************************//* Note: The following routines are used in Pro*C and have the same interface as their couterpart in OCI. Althought the interface follows for more details please refer to the above routines *//******************************************//* initialization/logon/logof *//******************************************/sword ocipin( /*_ ub4 mode _*/ );sword ologin( /*_ ldadef *lda, b2 areacount _*/ );sword ologon( /*_ ldadef *lda, b2 areacount _*/ );/*****************************************//* Open/Close/Parse Cursor *//*****************************************//* ** ocisqd - oci delayed parse (Should be used only with deferred upi/oci)** FUNCTION: Call upidpr to delay the parse of the sql statement till the** time that a call needs to be made to the kernel (execution or** describe time )** RETURNS: Oracle return code.*/ sword ocisq7(/*_ struct csrdef *cursor, oratext *sqlstm, sb4 sqllen, word defflg, ub4 sqlt _*/);/*****************************************//* Bind *//*****************************************/sword obind( /*_ struct csrdef *cursor, oratext *sqlvar, word sqlvl, ub1 *progv, word progvl, word ftype, word scale, oratext *fmt, word fmtl, word fmtt _*/ );sword obindn( /*_ struct csrdef *cursor, ub2 sqlvn, ub1 *progv, word progvl, word ftype, word scale, oratext *fmt, word fmtl, word fmtt _*/ );/**********************************************//* Define *//**********************************************/sword odfinn( /*_ struct csrdef *cursor, word pos, ub1 *buf, word bufl, word ftype, b2 *rc, word scale _*/ );/**********************************************//* Describe *//**********************************************/sword odsrbn( /*_ struct csrdef *cursor, word pos, b2 *dbsize, b2 *dtype, b2 *fsize _*/ );/******************************************//* Non-blocking operations *//******************************************/sword onblon( /*_ ldadef *lda, struct hstdef *hst, oratext *conn, sword connl, oratext *uid, sword uidl, oratext *psw, sword pswl, sword audit _*/ ); /* logon in non-blocking fashion */sword ocignfd( /*_ ldadef *lda, dvoid *nfdp _*/); /* get native fd */ub2 ocigft_getFcnType( /*_ ub2 oertyp _*/ ); /* get sql function code */#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -