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

📄 ocidef.h

📁 ORACLE访问接口
💻 H
📖 第 1 页 / 共 3 页
字号:
   **          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, text *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, text *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, text *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, text *conn,
                  sword connl, text *uid, sword uidl,
                  text *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 _*/ );
sword olon( /*_ ldadef *lda, text *uid, word uidl, text *psw, word pswl,
                  word audit _*/);
sword orlon( /*_ ldadef *lda, struct hstdef *hst, text *uid, word uidl,
	    text *psw, word pswl, word audit _*/ );
sword ologof( /*_ ldadef *lda _*/ );

/*****************************************/
/*        Open/Close/Parse Cursor        */
/*****************************************/
sword oopen( /*_ struct csrdef *cursor, ldadef *lda, text *dbn, word dbnl, 
                 word areasize, text *uid, word uidl _*/ );
sword oclose( /*_ struct csrdef *cursor _*/ );
sword osql3( /*_ struct csrdef *cursor, text *sqlstm, word sqllen _*/ );
sword oparse( /*_ struct csrdef *cursor, text *sqlstm, sb4 sqllen,
		word defflg, ub4 sqlt _*/);

/* 
** 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, text *sqlstm, sb4 sqllen,
                 word defflg, ub4 sqlt _*/);

/*****************************************/
/*     	   Commit/Rollback     	         */
/*****************************************/
sword ocom( /*_ ldadef *lda _*/ );
sword ocon( /*_ ldadef *lda _*/ );
sword ocof( /*_ ldadef *lda _*/ );
sword orol( /*_ ldadef *lda _*/ );


/*****************************************/
/*     	   Control/Options     	         */
/*****************************************/
sword oopt( /*_ struct csrdef *cursor, word erropt, word waitopt _*/ );
sword ocan( /*_ struct csrdef *cursor _*/ );
sword obreak( /*_ ldadef *lda _*/ );


/*****************************************/
/*     	      Bind     	       	       	 */
/*****************************************/
sword obind( /*_ struct csrdef *cursor, text *sqlvar, word sqlvl, ub1 *progv,
	         word progvl, word ftype, word scale, text *fmt, word fmtl,
	         word fmtt _*/ );
sword obindn( /*_ struct csrdef *cursor, ub2 sqlvn, ub1 *progv, word progvl,
                 word ftype, word scale, text *fmt, word fmtl, word fmtt _*/ );
sword obndrn( /*_ struct csrdef *cursor, word sqlvn, ub1 *progv, word progvl,
                  word ftype, word scale, b2 *indp, text *fmt, word fmtl, 
		  word fmtt _*/ );
sword obndrv( /*_ struct csrdef *cursor, text *sqlvar, word sqlvl, ub1 *progv,
  	         word progvl, word ftype, word scale, b2 *indp, text *fmt,
		 word fmtl, word fmtt _*/ );

/**********************************************/
/*     	       	   Define      	       	      */
/**********************************************/
sword odefin( /*_ struct csrdef *cursor, word pos, ub1 *buf, word bufl,
		 word ftype, word scale, b2 *indp, text *fmt, word fmtl,
		 word fmtt, ub2 *rl, ub2 *rc _*/ );
sword odfinn( /*_ struct csrdef *cursor, word pos, ub1 *buf, word bufl,
	          word ftype, b2 *rc, word scale _*/ );

/**********************************************/
/*     	       	   Describe    	       	      */
/**********************************************/
sword odsc ( /*_ struct csrdef *cursor, word pos, b2 *dbsize, b2 *fsize,
             b2 *rcode, b2 *dtype, b1 *buf, b2 *bufl, b2 *dsize _*/ );
sword odsrbn( /*_ struct csrdef *cursor, word pos, b2 *dbsize, b2 *dtype, 
	    b2 *fsize _*/ );
sword oname( /*_ struct csrdef *cursor, word pos, b1 *tbuf, b2 *tbufl,
	        b1 *buf, b2 *bufl _*/);

/***********************************************/
/*     	       	   Error message               */
/***********************************************/
#if !defined(__STDC__) && !defined(__cplusplus)
sword oermsg( /*_ b2 rcode, text *buffer _*/ );
sword oerhms( /*_ ldadef *lda, b2 rcode, text *buffer, word bufl _*/ );
#endif /* __STDC__ */

/***********************************************/
/*     	       	   Execute     	       	       */
/***********************************************/
sword oexec( /*_ struct csrdef *cursor _*/ );
sword oexn( /*_ struct csrdef *cursor, word iters, word roff _*/ );
sword oexfet( /*_ struct csrdef *cursor, ub4 nrows, word can, word exact _*/ );


/***********************************************/
/*     	       	   Fetch       	       	       */
/***********************************************/
sword ofetch( /*_ struct csrdef *cursor _*/ );
sword ofen( /*_ struct csrdef *cursor, word nrows _*/ );

/******************************************/
/*     	   Non-blocking operations        */
/******************************************/
sword onbset( /*_ ldadef *lda _*/ );  /* set a connection to non-blocking    */
sword onbtst( /*_ ldadef *lda _*/ );  /* test if connection is non-blocking  */
sword onbclr( /*_ ldadef *lda _*/ );  /* clear a connection to blocking      */
sword onblon( /*_ ldadef *lda, struct hstdef *hst, text *conn,
                  sword connl, text *uid, sword uidl,
                  text *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 + -