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

📄 ociap.h

📁 SQLAPI C/C++ 连接Oracle 数据库!
💻 H
📖 第 1 页 / 共 5 页
字号:
------------------------------OCIDateTimeAssign --------------------------sword OCIDateTimeAssign(dvoid *hndl, OCIError *err, CONST OCIDateTime *from, 		        OCIDateTime *to);NAME: OCIDateTimeAssign - OCIDateTime AssignmentPARAMETERS: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().from (IN) - datetime to be assignedto (OUT) - lhs of assignmentDESCRIPTION:        Performs date assignment. The type of the output will be same as that	of input------------------------------OCIDateTimeCheck----------------------------sword OCIDateTimeCheck(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 		 ub4 *valid );NAME: OCIDateTimeCheck - OCIDateTime CHecK if the given date is validPARAMETERS: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().date (IN) - date to be checkedvalid (OUT) -  returns zero for a valid date, otherwise   		the ORed combination of all error bits specified below:   Macro name                   Bit number      Error   ----------                   ----------      -----   OCI_DATE_INVALID_DAY         0x1             Bad day   OCI_DATE_DAY_BELOW_VALID     0x2             Bad DAy Low/high bit (1=low)   OCI_DATE_INVALID_MONTH       0x4             Bad MOnth   OCI_DATE_MONTH_BELOW_VALID   0x8             Bad MOnth Low/high bit (1=low)   OCI_DATE_INVALID_YEAR        0x10            Bad YeaR   OCI_DATE_YEAR_BELOW_VALID    0x20            Bad YeaR Low/high bit (1=low)   OCI_DATE_INVALID_HOUR        0x40            Bad HouR   OCI_DATE_HOUR_BELOW_VALID    0x80            Bad HouR Low/high bit (1=low)   OCI_DATE_INVALID_MINUTE      0x100           Bad MiNute   OCI_DATE_MINUTE_BELOW_VALID	0x200           Bad MiNute Low/high bit (1=low)   OCI_DATE_INVALID_SECOND      0x400           Bad SeCond   OCI_DATE_SECOND_BELOW_VALID  0x800           bad second Low/high bit (1=low)   OCI_DATE_DAY_MISSING_FROM_1582 0x1000        Day is one of those "missing"                                                from 1582   OCI_DATE_YEAR_ZERO           0x2000          Year may not equal zero   OCI_DATE_INVALID_TIMEZONE    0x4000          Bad Timezone   OCI_DATE_INVALID_FORMAT      0x8000          Bad date format input   So, for example, if the date passed in was 2/0/1990 25:61:10 in   (month/day/year hours:minutes:seconds format), the error returned   would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID |   OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTEDESCRIPTION:  	Check if the given date is valid.RETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.        OCI_ERROR if  	  'date' and 'valid' pointers are NULL pointers------------------------------- OCIDateTimeCompare----------------------------sword OCIDateTimeCompare(dvoid *hndl, OCIError *err, CONST OCIDateTime *date1,                      CONST OCIDateTime *date2,  sword *result );NAME: OCIDateTimeCompare - OCIDateTime CoMPare datesPARAMETERS: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().date1, date2 (IN) - dates to be comparedresult (OUT) - comparison result, 0 if equal, -1 if date1 < date2,   		1 if date1 > date2DESCRIPTION:The function OCIDateCompare compares two dates. It returns -1 if date1 is smaller than date2, 0 if they are equal, and 1 if date1 is greater than date2.RETURNS:       OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.        OCI_ERROR if  	  invalid date	  input dates are not mutually comparable------------------------------OCIDateTimeConvert----------------------sword OCIDateTimeConvert(dvoid *hndl, OCIError *err, OCIDateTime *indate, 				OCIDateTime *outdate);NAME: OCIDateTimeConvert - Conversion between different DATETIME typesPARAMETERS: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().indate (IN) - pointer to input dateoutdate (OUT) - pointer to output datetime DESCRIPTION: Converts one datetime type to another. The result type is       the type of the 'outdate' descriptor.RETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.	OCI_ERROR if	    conversion not possible.   ---------------------------- OCIDateTimeFromText-----------------------sword OCIDateTimeFromText(dvoid *hndl, OCIError *err, CONST OraText *date_str,              size_t d_str_length, CONST OraText *fmt, ub1 fmt_length,             CONST OraText *lang_name, size_t lang_length, OCIDateTime *date );NAME: OCIDateTimeFromText - OCIDateTime convert String FROM DatePARAMETERS: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_str (IN) - input string to be converted to Oracle dated_str_length (IN) - size of the input string, if the length is -1  		then 'date_str' is treated as a null terminated  stringfmt (IN) - conversion format; if 'fmt' is a null pointer, then                the string is expected to be in the default format for		the datetime type.fmt_length (IN) - length of the 'fmt' parameterlang_name (IN) - language in which the names and abbreviations of  	        days and months are specified, if null i.e. (OraText *)0,  		the default language of session is used, lang_length (IN) - length of the 'lang_name' parameterdate (OUT) - given string converted to dateDESCRIPTION:  	Converts the given string to Oracle datetime type set in the         OCIDateTime descriptor according to the specified format. Refer to         "TO_DATE" conversion function described in "Oracle SQL Language         Reference Manual" for a description of format.RETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.        OCI_ERROR if  	  invalid format  	  unknown language  	  invalid input string--------------------------- OCIDateTimeGetDate-------------------------sword OCIDateTimeGetDate(dvoid *hndl, OCIError *err,  CONST OCIDateTime *date, 	                   sb2 *year, ub1 *month, ub1 *day );NAME: OCIDateTimeGetDate - OCIDateTime Get Date (year, month, day)  				portion of DATETIME. 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      (OUT) - year valuemonth     (OUT) - month valueday       (OUT) - day value--------------------------- OCIDateTimeGetTime ------------------------sword OCIDateTimeGetTime(dvoid *hndl, OCIError *err, OCIDateTime *datetime,		 ub1 *hour, ub1 *minute, ub1 *sec, ub4 *fsec);NAME: OCIDateTimeGetTime - OCIDateTime Get Time (hour, min, second, 			fractional second)  of DATETIME. 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 hour      (OUT) - hour valueminute       (OUT) - minute valuesec       (OUT) - second valuefsec      (OUT) - Fractional Second value--------------------------- OCIDateTimeGetTimeZoneOffset ----------------------sword OCIDateTimeGetTimeZoneOffset(dvoid *hndl,OCIError *err,CONST               OCIDateTime *datetime,sb1 *hour,sb1  *minute);NAME: OCIDateTimeGetTimeZoneOffset - OCIDateTime Get TimeZone (hour, minute)                           portion of DATETIME. 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 hour      (OUT) - TimeZone Hour valueminute     (OUT) - TimeZone Minute value--------------------------- 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.------------------------------OCIDateTimeIntervalAdd----------------------sword OCIDateTimeIntervalAdd(dvoid *hndl, OCIError *err, OCIDateTime *datetime,	 OCIInterval *inter, OCIDateTime *outdatetime);NAME: OCIDateTimeIntervalAdd - Adds an interval to datetimePARAMETERS: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 input datetimeinter    (IN) - pointer to interval outdatetime (IN) - pointer to output datetime. The output datetime 				will be of same type as input datetimeDESCRIPTION: 	Adds an interval to a datetime to produce a resulting 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------------------------------OCIDateTimeIntervalSub----------------------sword OCIDateTimeIntervalSub(dvoid *hndl, OCIError *err, OCIDateTime *datetime,              OCIInterval *inter, OCIDateTime *outdatetime);NAME: OCIDateTimeIntervalSub - Subtracts an interval from a datetimePARAMETERS: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 input datetimeinter    (IN) - pointer to interval outdatetime (IN) - pointer to output datetime. The output datetime 				will be of same type as input datetimeDESCRIPTION:  	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

⌨️ 快捷键说明

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