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

📄 ocikp.h

📁 SQLAPI C/C++ 连接Oracle 数据库!
💻 H
📖 第 1 页 / 共 5 页
字号:
 	Subtracts an interval from a datetime and stores the result in a     	datetimeRETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.	OCI_ERROR if:		resulting date is before Jan 1, -4713		resulting date is after Dec 31, 9999--------------------------- OCIDateTimeConstruct-------------------------sword OCIDateTimeConstruct(dvoid  *hndl,OCIError *err,OCIDateTime *datetime,               sb2 year,ub1 month,ub1 day,ub1 hour,ub1 min,ub1 sec,ub4 fsec,               OraText  *timezone,size_t timezone_length);   NAME: OCIDateTimeConstruct - Construct an OCIDateTime. Only the relevant       fields for the OCIDateTime descriptor types are used.   PARAMETERS:        hndl (IN) - Session/Env handle.         err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().        datetime (IN) - Pointer to OCIDateTime         year      (IN) - year value        month     (IN) - month value        day       (IN) - day value                hour      (IN) - hour value        min       (IN) - minute value        sec       (IN) - second value        fsec      (IN) - Fractional Second value        timezone  (IN) - Timezone string        timezone_length(IN) - Length of timezone stringDESCRIPTION:       Constructs a DateTime descriptor. The type of the datetime is the       type of the OCIDateTime descriptor. Only the relevant fields based       on the type are used. For Types with timezone, the date and time       fields are assumed to be in the local time of the specified timezone.       If timezone is not specified, then session default timezone is       assumed.RETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_ERROR if datetime is not valid.--------------------------- OCIDateTimeSysTimeStamp---------------------sword OCIDateTimeSysTimeStamp(dvoid *hndl, OCIError *err,               OCIDateTime *sys_date ); NAME: OCIDateTimeSysTimeStamp - Returns system date/time as a TimeStamp with                       timezonePARAMETERS:hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().sys_date (OUT) - Pointer to output timestamp DESCRIPTION:         Gets the system current date and time as a timestamp with timezoneRETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL. ------------------------------OCIDateTimeSubtract-----------------------sword OCIDateTimeSubtract(dvoid *hndl, OCIError *err, OCIDateTime *indate1, 		OCIDateTime *indate2,	OCIInterval *inter);NAME: OCIDateTimeSubtract - subtracts two datetimes to return an intervalPARAMETERS:hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().indate1(IN) - pointer to subtrahendindate2(IN) - pointer to minuendinter  (OUT) - pointer to output intervalDESCRIPTION: 	Takes two datetimes as input and stores their difference in an         interval. The type of the result interval is the type of the         'inter' descriptor.RETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.	OCI_ERROR if	   datetimes are not comparable.--------------------------- OCIDateTimeToText--------------------------sword OCIDateTimeToText(dvoid *hndl, OCIError *err, CONST OCIDateTime *date,                         CONST OraText *fmt, ub1 fmt_length, ub1 fsprec,                        CONST OraText *lang_name, size_t lang_length,                         ub4 *buf_size, OraText *buf );NAME: OCIDateTimeToText - OCIDateTime convert date TO String PARAMETERS:hndl (IN) - Session/Env handle. If Session Handle is passed, the 		    conversion takes place in session NLS_LANGUAGE and		    session NLS_CALENDAR, otherwise the default is used.err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().date (IN) - Oracle datetime to be convertedfmt (IN) - conversion format, if null string pointer (OraText*)0, then                the date is converted to a character string in the                default format for that type.fmt_length (IN) - length of the 'fmt' parameterfsprec (IN) - specifies the fractional second precision in which the               fractional seconds is returned.lang_name (IN) - specifies the language in which the names and   	        abbreviations of months and days are returned;  	        default language of session is used if 'lang_name'   		is null i.e. (OraText *)0lang_length (IN) - length of the 'nls_params' parameterbuf_size (IN/OUT) - size of the buffer; size of the resulting string                is returned via this parameterbuf (OUT) - buffer into which the converted string is placedDESCRIPTION:        Converts the given date to a string according to the specified format.        Refer to "TO_DATE" conversion function described in        "Oracle SQL Language Reference Manual" for a description of format        and NLS arguments. The converted null-terminated date string is        stored in the buffer 'buf'.RETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.        OCI_ERROR if  	  buffer too small  	  invalid format  	  unknown language          overflow error----------------------------OCIDateTimeGetTimeZoneName------------------------sword OCIDateTimeGetTimeZoneName(dvoid *hndl,                                  OCIError *err,                                 CONST OCIDateTime *datetime,                                 ub1 *buf,                                 ub4 *buflen);NAME OCIDateTimeGetTimeZoneName - OCI DateTime Get the Time Zone NamePARAMETERS:hndl (IN)      - Session/Env handle.err (IN/OUT)   - error handle. If there is an error, it is                 recorded in 'err' and this function returns OCI_ERROR.                 The error recorded in 'err' can be retrieved by calling                 OCIErrorGet().datetime (IN)   - Pointer to an OCIDateTime.buf (OUT)       - User allocated storage for name string.buflen (IN/OUT) - length of buf on input, length of name on outDESCRIPTION:        Returns either the timezone region name or the absolute hour and minute        offset. If the DateTime was created with a region id then the region         name will be returned in the buf.  If the region id is zero, then the         hour and minute offset is returned as "[-]HH:MM".RETURNS:       OCI_SUCCESS if the function completes successfully.       OCI_INVALID_HANDLE if 'err' is NULL.       OCI_ERROR if         buffer too small         error retrieving timezone data         invalid region          invalid LdiDateTime type----------------------------OCIDateTimeFromArray-------------------------------sword OCIDateTimeFromArray(dvoid *hndl,                          OCIError *err,                         ub1 *inarray,                         ub4 len                         ub1 type                         OCIDateTime *datetime,                         OCIInterval *reftz,                         ub1 fsprec);NAME OCIDateTimeFromArray - OCI DateTime convert From Array formatPARAMETERS:hndl (IN)      - Session/Env handle.err (IN/OUT)   - error handle. If there is an error, it is                 recorded in 'err' and this function returns OCI_ERROR.                 The error recorded in 'err' can be retrieved by calling                 OCIErrorGet().inarray (IN)   - Pointer to input array representtion of DateTimelen (IN)       - len of inarray.type (IN)      - One of SQLT_DATE, SQLT_TIME, SQLT_TIME_TZ, SQLT_TIMESTAMP,                 SQLT_TIMESTAMP_TZ, or SQLT_TIMESTAMP_LTZ.datetime (OUT) - Pointer to the result OCIDateTime.reftz (IN)     - timezone interval used with SQLT_TIMESTAMP_LTZ.fsprec (IN)    - fractionl seconds digits of precision (0-9).DESCRIPTION:        Returns a pointer to an OCIDateTime of type type converted from         the inarray.RETURNS:       OCI_SUCCESS if the function completes successfully.       OCI_INVALID_HANDLE if 'err' is NULL.       OCI_ERROR if         buffer too small         error retrieving timezone data         invalid region          invalid LdiDateTime type-----------------------------OCIDateTimeToArray------------------------------sword OCIDateTimeToArray(dvoid *hndl,                          OCIError *err,                         CONST OCIDateTime *datetime,                         CONST OCIInterval *reftz,                         ub1 *outarray,                         ub4 len,                         ub1 fsprec);NAME OCIDateTimeToArray - OCI DateTime convert To Array formatPARAMETERS:hndl (IN)      - Session/Env handle.err (IN/OUT)   - error handle. If there is an error, it is                 recorded in 'err' and this function returns OCI_ERROR.                 The error recorded in 'err' can be retrieved by calling                 OCIErrorGet().datetime (IN)  - Pointer to the OCIDateTime to convert.reftz (IN)     - Interval defining the timezone for SQLT_TIMESTAMP_LTZ.outarray (OUT) - result array.len (IN)       - length of outarray.fsprec (IN)    - number of fractional seconds digits. DESCRIPTION:        Returns an array representing the input DateTime descriptor.RETURNS:       OCI_SUCCESS if the function completes successfully.       OCI_INVALID_HANDLE if 'err' is NULL.       OCI_ERROR if         buffer too small         error retrieving timezone data         invalid region          invalid LdiDateTime type----------------------------------OCIRowidToChar-----------------------------NameOCIRowidToCharPurposeConverts physical/logical (universal) ROWID to chracter extended (Base 64)representation into user provided buffer outbfp of length outbflp. Afterexecution outbflp contains amount of bytes converted.In case of truncationerror, outbflp contains required size to make this conversion successfuland returns ORA-1405.Syntaxsword OCIRowidToChar( OCIRowid *rowidDesc,                      OraText *outbfp,                      ub2 *outbflp,                      OCIError *errhp)CommentsAfter this conversion, ROWID in character format can be bound usingOCIBindByPos or OCIBindByName call and used to query a row at adesired ROWID.ParametersrowidDesc (IN)   - rowid DESCriptor which is allocated from OCIDescritorAlloc                   and populated by a prior SQL statement executionoutbfp (OUT)     - pointer to the buffer where converted rowid in character                   representation is stored after successful execution.outbflp (IN/OUT) - pointer to output buffer length variable.                   Before execution (IN mode) *outbflp contains the size of                   outbfp, after execution (OUT mode) *outbflp contains amount                   of bytes converted. In an event of truncation during                   conversion *outbflp contains the required length to make                   conversion successful.errhp (IN/OUT)   - an error handle which can be passed to OCIErrorGet() for                   diagnostic information in the event of an error.------------------------------OCIDefineArrayOfStruct--------------------------OCIDefineArrayOfStruct()NameOCI Define for Array of StructuresPurposeThis call specifies additional attributes necessary for a static array define.Syntaxsword OCIDefineArrayOfStruct ( OCIDefine   *defnp,                             OCIError    *errhp,                             ub4         pvskip,                              ub4         indskip,                              ub4         rlskip,                             ub4         rcskip );CommentsThis call specifies additional attributes necessary for an array defi

⌨️ 快捷键说明

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