![]() |
|
![]() |
|
OmniAccess API |
Functions |
|
OADESCRIBEReturns data type information about the selection items specified in the preceding oaselect through the selectitemlist parameter. oadescribe fills a structure (selectitemlist) that describes the data types, lengths and boundaries of the select items as they are returned by oaselect. You can read selectitemlist to determine whether the data returned by oaselect is suited to your application. If a select item is not suited to your application, you can change its entry to convert it and pass the changed selectitemlist to oabind to effect the conversion. For example, if the selectitemlist shows that SHIP_DATE is a DATE column, you could use oabind to convert it to character type before formatting it and displaying it to a user. Before you use oabind to convert the SQL select items specified in a call to oaselect, use oadescribe to return information about select items for that cursor. This is useful for converting select items from their defined or default data types and lengths to types and lengths more suited to your application. Although you could determine the default types and lengths of the select items you specified in oaselect’s column parameter from the type of select item, or the column definition in the environment catalog, it is easier to call oadescribe to do it for you. You can then call oabind to pass the changed req_datatype and req_length fields of the selectitemlist elements that correspond to select items you want to convert. If you pass the COLUMN option to oaselect, you must use oabind to establish the fetch address for each select item before the first call to oafetch. Calling oadescribe sets up the structures so that all you have to do is assign a buffer address in the data element of the selectitemlist parameter for each select item and call oabind.
Syntaxoadescribe (cursor, options, status, num_columns, select_list) cursor -- Is a 32-bit signed integer passed by value. This is the value returned by a successful call to oaopencursor. Cursor represents the retrieval environment to which data projection applies. options -- Is currently reserved and must contain a semicolon or a null character passed by reference. status -- A reference to the Status Structure which indicates the success or failure of the oadescribe routine. A zero status.error indicates the successful execution of oadescribe. The status structure is passed by reference and contains fourteen 32-bit signed integers, followed by a 36-character buffer. The information returned to the status structure is discussed next: num_columns -- Contains the number of selectitemlist structures to return for the specified cursor. The value must be greater than or equal to the value of status word 11 in the preceding call to oaselect. Num_columns is a 32-bit signed integer passed by value. selectitemlist -- A reference to the oaselect_list.
Options
Example
|
|
APIs![]() |
SQL
Reference ![]() |
Stored
Procedures ![]() |
Third
Party Tools ![]() |
Debugging
![]() |
OmniAccess API |
ODBC |
JDBC |
Nested Queries |
SET Operations |
WITH Options |
CURSOR / INSTANCE |
Commands |
Functions |
SQL Server |
Oracle |
MS Access |
Ms Excel |