Translates or registers a specified data format name and returns a format number.
DDE.GETFORMATNUM (FormatStr)
Parameter |
Type |
Description |
---|---|---|
FormatStr |
VARCHAR2 |
Data format name string |
This function converts a data format from a string to a number. This number can be used in Poke and Request transactions to represent the DataFormat parameter.
If the specified name is not registered, this function registers it and returns a unique format number. This is the only way to use a format in a Poke or Request transaction that is not one of the predefined formats.
This function returns the numeric representation of the data format string that is a PLS_INTEGER.
See Microsoft Windows Predefined Data Formats for the predefined data format constants.
DECLARE
FormatNum PLS_INTEGER;
MyFormatNum PLS_INTEGER;
BEGIN
/* Get predefined format number for "CF_TEXT"
(should return CF_TEXT=1). */
FormatNum := DDE.GetFormatNum('CF_TEXT');
/* Register a user-defined data format called "MY_FORMAT". */
MyFormatNum := DDE.GetFormatNum('MY_FORMAT');
END;