| Oracle9i Globalization Support Guide Release 1 (9.0.1) Part Number A90236-02 |
|
This chapter contains information useful for OCI programming, including:
Many OCI NLS functions accept either the environment handle or the user session handle. The OCI environment handle is associated with the client NLS environment and initialized with the client NLS settings (environment variables). This environment does not change when ALTER SESSION statements are issued to the server. The character set associated with the environment handle is the client character set. The OCI session handle (returned by OCISessionBegin) is associated with the server session environment. Its NLS settings change when the session environment is modified with ALTER SESSION. The character set associated with the session handle is the database character set.
Note that the OCI session handle does not have any NLS settings associated with it until the first transaction begins in the session. SELECT statements do not begin a transaction.
An Oracle locale consists of language, territory, and character set definitions. The locale determines conventions such as native day and month names, as well as date, time, number, and currency formats. An internationalized application obeys a user's locale setting and cultural conventions. For example, in a German locale setting, users expect to see day and month names in German.
Using environment handles, you can retrieve the following information:
sword OCINlsGetInfo(dvoid *hndl, OCIError *errhp, OraText *buf, size_t buflen, ub2 item)
This function generates language information specified by item from OCI environment or user session handle hndl into an array pointed to by buf within a size limitation as buflen. If the Unicode mode is enabled, then text data is returned in UTF-16.
OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong items
When calling OCINlsGetInfo(), you need to allocate the buffer to store the returned information for the particular language. The buffer size varies, depending on which item you are querying and what encoding you are using to store the information. Developers should not need to know how many bytes it takes to store "January" in Japanese using JA16SJIS encoding. That is exactly what OCI_NLS_MAXBUFSZ is used for; it guarantees that the OCI_NLS_MAXBUFSZ is big enough to hold the largest item returned by OCINlsGetInfo(). This guarantees that the largest item returned by OCINlsGetInfo() will fit in the buffer.
The following is a simple case of retrieving information and checking for errors.
sword MyPrintLinguisticName(envhp, errhp) OCIEnv *envhp; OCIError *errhp; { OraText infoBuf[OCI_NLS_MAXBUFSZ]; sword ret; ret = OCINlsGetInfo(envhp, /* environment handle */ errhp, /* error handle */ infoBuf, /* destination buffer */ (size_t) OCI_NLS_MAXBUFSZ, /* buffer size */ (ub2) OCI_NLS_LINGUISTIC_NAME); /* item */ if (ret != OCI_SUCCESS) { checkerr(errhp, ret, OCI_HTYPE_ERROR); ret = OCI_ERROR; } else { printf("NLS linguistic: %s\n", infoBuf); } return(ret); }
Two types of data structure are supported for string manipulation: multibyte string and wide character string. Multibyte strings are in native Oracle character set encoding and functions operated on them take the string as a whole unit. Wide character string wchar functions provide more flexibility in string manipulation and support character-based and string-based operations.
The wide character datatype is Oracle-specific and not to be confused with the wchar_t defined by the ANSI/ISO C standard. The Oracle wide character is always 4 bytes in all platforms, while wchar_t is depends on the implementation and the platform. The idea of the Oracle wide character is to normalize multibyte character to have a fixed-width encoding for easy processing. This way, round-trip conversion between the Oracle wide character set and the native character set is guaranteed.
The string manipulation can be classified into the following categories:
Table 8-2 OCI String Manipulation Calls
sword OCIMultiByteToWideChar(dvoid *hndl, OCIWchar *dst, CONST OraText *src, size_t *rsize);
This routine converts an entire NULL-terminated string into the wchar format. The wchar output buffer will be NULL-terminated.
OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
sword OCIMultiByteInSizeToWideChar(dvoid *hndl, OCIWchar *dst, size_t dstsz, CONST OraText *src, size_t srcsz, size_t *rsize)
This routine converts part of a string into the wchar format. It will convert as many complete characters as it can until it reaches the output buffer size or input buffer size or it reaches a NULL-terminator in source string. The output buffer will be NULL-terminated if space permits. If dstsz is zero, then this function will only return the number of characters not including the ending NULL terminator needed for converted string.
OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
sword OCIWideCharToMultiByte(dvoid *hndl, OraText *dst, CONST OCIWchar *src, size_t *rsize)
This routine converts an entire NULL-terminated wide character string into a multibyte string. The output buffer will be NULL-terminated.
OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
sword OCIWideCharInSizeToMultiByte(dvoid *hndl, OraText *dst, size_t dstsz, CONST OCIWchar *src, size_t srcsz, size_t *rsize)
This routine converts part of wchar string into the multibyte format. It will convert as many complete characters as it can until it reaches the output buffer size, the input buffer size, or it reaches a NULL-terminator in source string. The output buffer will be NULL-terminated if space permits. If dstsz is zero, the function just returns the size of byte not including the ending NULL-terminator needed to store the converted string.
OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
OCIWchar OCIWideCharToLower(dvoid *hndl, OCIWchar wc)
If there is an upper-case character mapping for wc in the specified locale, it will return the lower-case in wchar, else return wc itself.
A wchar
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
OCIWchar OCIWideCharToUpper(dvoid *hndl, OCIWchar wc)
If there is a uppercase character mapping for wc in the specified locale, then it will return the uppercase character in wchar.Otherwise, it will return the wc itself.
A wchar
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
int OCIWideCharStrcmp(dvoid *hndl, CONST OCIWchar *wstr1, CONST OCIWchar *wstr2, int flag)
It compares two wchar strings in binary (based on wchar encoding value), linguistic, or case-insensitive.
wstr1 == wstr2
wstr1 > wstr2
wstr1 < wstr2
Table 8-9 OCIWideCharStrcmp Keywords/Parameters
int OCIWideCharStrncmp(dvoid *hndl, CONST OCIWchar *wstr1, size_t len1, CONST OCIWchar *wstr2, size_t len2, int flag)
This function is similar to OCIWideCharStrcmp(), except that at most len1 characters from wstr1 and len2 characters from wstr1 are compared. The NULL-terminator will be taken into the comparison.
wstr1 = wstr2
wstr1 > wstr2
wstr1 < wstr2
Table 8-10 OCIWideCharStrncmp Keywords/Parameters
size_t OCIWideCharStrcat(dvoid *hndl, OCIWchar *wdststr, CONST OCIWchar *wsrcstr)
This function appends a copy of the wchar string pointed to by wsrcstr, including the NULL-terminator to the end of wchar string pointed to by wdststr.
The number of characters in the result string, not including the ending NULL-terminator.
OCIWchar *OCIWideCharStrchr(dvoid *hndl, CONST OCIWchar *wstr, OCIWchar wc)
This function searches for the first occurrence of wc in the wchar string pointed to by wstr.
A wchar pointer if successful, otherwise a NULL pointer
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
Pointer to the |
|
|
|
size_t OCIWideCharStrcpy(dvoid *hndl, OCIWchar *wdststr, CONST OCIWchar *wsrcstr)
This function copies the wchar string pointed to by wsrcstr, including the NULL-terminator, into the array pointed to by wdststr.
The number of characters copied not including the ending NULL-terminator.
size_t OCIWideCharStrlen(dvoid *hndl, CONST OCIWchar *wstr)
This function computes the number of characters in the wchar string pointed to by wstr, not including the NULL-terminator, and returns this number.
The number of characters not including ending NULL-terminator.
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
Pointer to the source |
size_t OCIWideCharStrncat(dvoid *hndl, OCIWchar *wdststr, CONST OCIWchar *wsrcstr, size_t n)
This function is similar to OCIWideCharStrcat(), except that at most n characters from wsrcstr are appended to wdststr. Note that the NULL-terminator in wsrcstr will stop appending. wdststr will be NULL-terminated.
The number of characters in the result string, not including the ending NULL-terminator.
size_t OCIWideCharStrncpy(dvoid *hndl, OCIWchar *wdststr, CONST OCIWchar *wsrcstr, size_t n)
This function is similar to OCIWideCharStrcpy(), except that at most n characters are copied from the array pointed to by wsrcstr to the array pointed to by wdststr. Note that the NULL-terminator in wdststr will stop coping and result string will be NULL-terminated.
The number of characters copied not including the ending NULL-terminator.
OCIWchar *OCIWideCharStrrchr(dvoid *hndl, CONST OCIWchar *wstr, OCIWchar wc)
This function searches for the last occurrence of wc in the wchar string pointed to by wstr. It returns a pointer to the wchar if successful, or a NULL pointer.
wchar pointer if successful, otherwise a NULL pointer
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
Pointer to the |
|
|
|
size_t OCIWideCharStrCaseConversion(dvoid *hndl, OCIWchar *wdststr, CONST OCIWchar*wsrcstr, ub4 flag)
This function converts the wide char string pointed to by wsrcstr into the uppercase or lowercase specified by the flag and copies the result into the array pointed to by wdststr. The result string will be NULL-terminated.
The number of characters for the result string, not including NULL-terminator
size_t OCIWideCharDisplayLength(dvoid *hndl, OCIWchar wc)
This function determines the number of column positions required for wc in display. It returns the number of column positions, or 0 if wc is the NULL-terminator.
The number of display positions.
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
size_t OCIWideCharMultiByteLen(dvoid *hndl, OCIWchar wc)
This function determines the number of byte required for wc in multibyte encoding. It returns the number of bytes in multibyte for wc.
The number of bytes.
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
int OCIMultiByteStrcmp(dvoid *hndl, CONST OraText *str1, CONST OraText *str2, int flag)
It compares two multibyte strings in binary (based on encoding value), linguistic, or case-insensitive.
str1 == str2
str1 > str2
str1 < str2
Table 8-21 OCIMultiByteStrcmp Keywords/Parameters
int OCIMultiByteStrncmp(dvoid *hndl, CONST OraText *str1, size_t len1, OraText *str2, size_t len2, int flag)
This function is similar to OCIMultiByteStrcmp(), except that at most len1 bytes from str1 and len2 bytes from str2 are compared. The NULL-terminator will be taken into the comparison.
str1 = str2
str1 > str2
str1 < str2
Table 8-22 OCIMultiByteStrncmp Keywords/Parameters
size_t OCIMultiByteStrcat(dvoid *hndl, OraText *dststr, CONST OraText *srcstr)
This function appends a copy of the multibyte string pointed to by srcstr, including the NULL-terminator to the end of string pointed to by dststr. It returns the number of bytes in the result string not including the ending NULL-terminator.
The number of bytes in the result string, not including the ending NULL-terminator
size_t OCIMultiByteStrcpy(dvoid *hndl, OraText *dststr, CONST OraText *srcstr)
This function copies the multibyte string pointed to by srcstr, including the NULL-terminator, into the array pointed to by dststr. It returns the number of bytes copied, not including the ending NULL-terminator.
The number of bytes copied, not including the ending NULL-terminator
| Keyword/Parameter | Meaning |
|---|---|
|
|
Pointer to the OCI environment or user session handle |
|
|
Pointer to the destination buffer |
|
|
Pointer to the source multibyte string |
size_t OCIMultiByteStrlen(dvoid *hndl, CONST OraText *str)
This function computes the number of bytes in the multibyte string pointed to by str, not including the NULL-terminator, and returns this number.
The number of bytes not including ending NULL-terminator
| Keyword/Parameter | Meaning |
|---|---|
|
|
Pointer to the OCI environment or user session handle |
|
|
Pointer to the source multibyte string |
size_t OCIMultiByteStrncat(dvoid *hndl, OraText *dststr, CONST OraText *srcstr, size_t n)
This function is similar to OCIMultiByteStrcat(), except that at most n bytes from srcstr are appended to dststr. Note that the NULL-terminator in srcstr will stop appending and the function will append as many character as possible within n bytes. dststr will be NULL-terminated.
The number of bytes in the result string, not including the ending NULL-terminator.
size_t OCIMultiByteStrncpy(dvoid *hndl, OraText *dststr, CONST OraText *srcstr, size_t n)
This function is similar to OCIMultiByteStrcpy(), except that at most n bytes are copied from the array pointed to by srcstr to the array pointed to by dststr. Note that the NULL-terminator in srcstr will stop coping and the function will copy as many character as possible within n bytes. The result string will be NULL-terminated.
The number of bytes copied not including the ending NULL-terminator
size_t OCIMultiByteStrnDisplayLength(dvoid *hndl, CONST OraText *str1, size_t n)
This function returns the number of display positions occupied by the complete characters within the range of n bytes.
The number of display positions.
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle |
|
|
Pointer to a multibyte string |
|
|
The number of bytes to examine |
size_t OCIMultiByteStrCaseConversion(dvoid *hndl, OraText *dststr, CONST OraText *srcstr, ub4 flag)
This function convert the multibyte string pointed to by srcstr into the uppercase or lowercase specified by flag and copies the result into the array pointed to by dststr. The result string will be NULL-terminated.
The number of bytes for result string, not including NULL-terminator
The following is a simple case of handling string manipulation.
size_t MyConvertMultiByteToWideChar(envhp, dstBuf, dstSize, srcStr) OCIEnv *envhp; OCIWchar *dstBuf; size_t dstSize; OraText *srcStr; /* null terminated source string */ { sword ret; size_t dstLen = 0; size_t srcLen; /* get length of source string */ srcLen = OCIMultiByteStrlen(envhp, srcStr); ret = OCIMultiByteInSizeToWideChar(envhp, /* environment handle */ dstBuf, /* destination buffer */ dstSize, /* destination buffer size */ srcStr, /* source string */ srcLen, /* length of source string */ &dstLen); /* pointer to destination length */ if (ret != OCI_SUCCESS) { checkerr(envhp, ret, OCI_HTYPE_ENV); } return(dstLen); }
The Oracle Call Interface offers many function calls for classifying characters.
boolean OCIWideCharIsAlnum(dvoid *hndl, OCIWchar wc)
It tests whether wc is a letter or decimal digit.
TRUE or FALSE.
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
boolean OCIWideCharIsAlpha(dvoid *hndl, OCIWchar wc)
It tests whether wc is an alphabetic letter.
TRUE or FALSE.
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
boolean OCIWideCharIsCntrl(dvoid *hndl, OCIWchar wc)
It tests whether wc is a control character.
TRUE or FALSE.
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
boolean OCIWideCharIsDigit(dvoid *hndl, OCIWchar wc)
It tests whether wc is a decimal digit character.
TRUE or FALSE.
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
boolean OCIWideCharIsGraph(dvoid *hndl, OCIWchar wc)
It tests whether wc is a graph character. A graph character is character with a visible representation and normally includes an alphabetic letter, decimal digit, and punctuation.
TRUE or FALSE
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
boolean OCIWideCharIsLower(dvoid *hndl, OCIWchar wc)
It tests whether wc is a lowercase letter.
TRUE or FALSE
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
boolean OCIWideCharIsPrint(dvoid *hndl, OCIWchar wc)
It tests whether wc is a printable character.
TRUE or FALSE
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
boolean OCIWideCharIsPunct(dvoid *hndl, OCIWchar wc)
It tests whether wc is a punctuation character.
TRUE or FALSE
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
boolean OCIWideCharIsSpace(dvoid *hndl, OCIWchar wc)
It tests whether wc is a space character. A space character only causes white space in displayed text (for example, space, tab, carriage return, newline, vertical tab or form feed).
TRUE or FALSE
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
boolean OCIWideCharIsUpper(dvoid *hndl, OCIWchar wc)
It tests whether wc is an uppercase letter.
TRUE or FALSE
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
boolean OCIWideCharIsXdigit(dvoid *hndl, OCIWchar wc)
It tests whether wc is a hexadecimal digit (0-9, A-F, a-f).
TRUE or FALSE
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
boolean OCIWideCharIsSingleByte(dvoid *hndl, OCIWchar wc)
It tests whether wc is a single-byte character when converted into multibyte.
TRUE or FALSE
| Keyword/Parameter | Meaning |
|---|---|
|
|
OCI environment or user session handle to determine the character set |
|
|
|
/* Character classification sample code */ boolean MyIsNumberWideCharString(envhp, srcStr) OCIEnv *envhp; OCIWchar *srcStr; /* wide char source string */ { OCIWchar *pstr = srcStr; /* define and init pointer */ boolean status = TRUE; /* define and init status variable */ /* Check input */ if (pstr == (OCIWchar*) NULL) return(FALSE); if (*pstr == (OCIWchar) NULL) return(FALSE); /* check each character for digit */ do { if (OCIWideCharIsDigit(envhp, *pstr) != TRUE) { status = FALSE; break; /* non decimal digit character */ } } while ( *++pstr != (OCIWchar) NULL); return(status); }
Conversion between Oracle character set and Unicode (16-bit, fixed-width Unicode encoding) is supported. Replacement characters are used if there a character has no mapping from Unicode to the Oracle character set. Therefore, conversion back to the original character set is not always possible.
sword OCICharSetToUnicode(dvoid *hndl, ub2 *dst, size_t dstlen, CONST OraText *src, size_t srclen, size_t *rsize)
This function converts a multibyte string pointed to by src to Unicode into the array pointed to by dst. The conversion will stop when it reaches the source limitation or destination limitation. The function will return the number of characters converted into Unicode. If dstlen is zero, it will just return the number of characters into rsize for the result without real conversion.
OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
sword OCIUnicodeToCharSet(dvoid *hndl, OraText *dst, size_t dstlen, CONST ub2 *src, size_t srclen, size_t *rsize)
This function converts a Unicode string pointed to by src to multibyte into the array pointed to by dst. The conversion will stop when it reach to the source limitation or destination limitation. The function will return the number of bytes converted into multibyte. If dstlen is zero, it will just return the number of bytes into rsize for the result without real conversion.
If a Unicode character is not convertible for the character set specified in OCI environment or user session handle, a replacement character will be used for it. In this case, OCICharsetConversionIsReplacementUsed() will return true.
OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
boolean OCICharSetConversionIsReplacementUsed(dvoid *hndl)
This function indicates whether the replacement character was used for nonconvertible characters in character set conversion in the last invocation of OCICharSetToUnicode().
TRUE if the replacement character was used when OCICharsetConv() was last invoked, else FALSE.
| Keyword/Parameter | Meaning |
|---|---|
|
|
Pointer to an OCI environment or user session handle |
Conversion between the Oracle character set and Unicode (16-bit, fixed-width Unicode encoding) is supported. Replacement characters are used if there is no mapping for a character from Unicode to the Oracle character set. thus, conversion back to the original character set is not always possible.
The following is a simple conversion into Unicode:
size_t MyConvertMultiByteToUnicode(envhp, dstBuf, dstSize, srcStr) OCIEnv *envhp; ub2 *dstBuf; size_t dstSize; OraText *srcStr; { sword ret; size_t dstLen = 0; size_t srcLen; /* get length of source string */ srcLen = OCIMultiByteStrlen(envhp, srcStr); ret = OCICharSetToUnicode(envhp, /* environment handle */ dstBuf, /* destination buffer */ dstSize, /* size of destination buffer */ srcStr, /* source string */ srcLen, /* length of source string */ &dstLen); /* pointer to destination length */ if (ret != OCI_SUCCESS) { checkerr(envhp, ret, OCI_HTYPE_ENV); } return(dstLen); }
The user message API provides a simple interface for cartridge developers to retrieve their own messages as well as Oracle messages.
sword OCIMessageOpen(dvoid *hndl, OCIError *errhp, OCIMsg **msghp, CONST OraText *product, CONST OraText *facility, OCIDuration dur)
This function opens a message-handling facility in a language pointed to by hndl. It first tries to open the message file corresponding to hndl for the facility. If it succeeds, it will use that file to initialize a message handle. Otherwise it will use the default message file, whose language is AMERICAN. The function returns a pointer pointed to a message handle into the msghp parameter. If the Unicode mode is enabled, then the text parameters must be in UTF-16.
OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
OraText *OCIMessageGet(OCIMsg *msgh, ub4 msgno, OraText *msgbuf, size_t buflen)
This function will get a message with the message number identified by msgno. If buflen is not zero, then the function will copy the message into the buffer pointed to by msgbuf. If buflen is zero, then the message will be copied into a message buffer inside the message handle pointed to by msgh. For both cases. it will return the pointer to the NULL-terminated message string. If it cannot get the requested message, then it will return a NULL pointer. If the Unicode mode is enabled, then the message is returned in UTF-16.
If successful, a pointer to a NULL-terminated message string on success. Otherwise a NULL pointer
sword OCIMessageClose(dvoid *hndl, OCIError *errhp, OCIMsg *msgh)
This function closes a message handle pointed to by msgh and frees any memory associated with this handle.
OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
The lmsgen utility converts text-based message files (.msg) into binary format (.msb).
LMSGENtext_fileproductfacility[language]
where
text file is a message text fileproduct is the name of the productfacility is the name of the facility
[language] is the optional message language in
<language>_<territory>.<character set> format
This is required if the message file is not tagged properly with language.
# CHARACTER_SET_NAME= Japanese_Japan.JA16EUC
<message #>, <warning level #>, <message text>
/ Copyright (c) 1988 by the Oracle Corporation. All rights reserved. / This is a testing us7ascii message file # CHARACTER_SET_NAME= american_america.us7ascii / 00000, 00000, "Export terminated unsuccessfully\n" 00003, 00000, "no storage definition found for segment(%lu, %lu)"
This example retrieves messages from a .msb message file. The following settings are used:
product = $HOME/myApp facility = imp Language = American language
Based on the above setting, the $HOME/myApp/mesg/impus.msb message file will be used.
Lmsgen converts the message file (impus.msg) into binary format (impus.msb).
The following is a portion of the text message file called impus.msg:
... 00128,2, "Duplicate entry %s found in %s" ...
/* Assume that the OCI environment or user session handle, product, facility and
cache size are all initialized properly. */
...
OCIMsg msghnd; /* message handle */
/* initialize a message handle for retrieving messages from impus.msg*/
err = OCIMessageOpen(hndl,errhp, &msghnd, prod,fac,OCI_DURATION_SESSION);
if (err != OCI_SUCCESS)
/* error handling */
...
/* retrieve the message with message number = 128 */
msgptr = OCIMessageGet(msghnd, 128, msgbuf, sizeof(msgbuf));
/* do something with the message, such as display it */
...
/* close the message handle when we has no more message to retrieve */
OCIMessageClose(hndl, errhp, msghnd);
|
|
![]() Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|