version 6.5
OD Describe object (login_ID; objectName; overLoad; position; level; paramName; type; default; mode; size) Integer
| Parameter | Type | Description | |
| login_ID | Longint | Connection Identifier | |
| objectName | String | Text | Name of the object | |
| overLoad | Pointer | Pointer to array number of overflow | |
| position | Pointer | Pointer to array integer of argument order | |
| level | Pointer | Pointer to array integer | |
| paramName | Pointer | Pointer to array alpha of name of the argument | |
| type | Pointer | Pointer to array integer on type of the argument | |
| default | Pointer | Pointer to array integer of default value | |
| mode | Pointer | Pointer to array integer of In; out; In/Out | |
| size | Pointer | Pointer to array longint of size of the datatype | |
| Function result | Integer | Error code (1 = the operation is successful, | |
| -1 = an error occurs) |
Description
The command OD Describe object allows you to store into arrays specifications about the structure of functions and the procedures and functions included in packages.
loginID must be a valid connection identifier.
objectName is the name of the object about which you want to obtain information. For example, if you want to get information about a function MyFunc contained in a package MyPack, you should pass "MyPack.MyFunc" in objectName.
overLoad indicates if the procedure or function is overloaded or not and the number of overloadings. If the procedure or function is not overloaded, 0 is returned. Otherwise, overLoad contains the number of overloadings. For example, if you have a package that contains 2 functions MyFunc1 but each one contain different parameters, overLoad will contain 1 for the first one and 2 for the second.
position is the order of appearence of the arguments of the procedure or function. For example, the following procedure :
PROCEDURE P_GETEMP(tab_size in number, tabEmpNo OUT arrayChar,tabEmpName OUT arrayChar);
gives the following position result : tab_size -> 1; tabEmpNo -> 2; tabEmpName -> 3
level returns 0 for scalar parameters. For array parameters, 0 is returned for the array itself. The next element in the return array is at level 1, and describes the element type of the array.
paramName is the name of the parameter.
type is the type of variables as defined by Oracle (See index for detail).
default indicates whether the corresponding parameter has a default value. 0 returned indicates no default; 1 indicates that a default value was supplied in the procedure or function specification.
mode indicates the mode of the corresponding parameter. 0 indicates an Input parameter; 1 indicates an Output parameter and 2 indicates a Input/Output parameter.
size is the size of the datatype in bytes. For number type, 22 is returned.
OD Describe object returns -1 if failed or 1 if succeed.
Example
Here is a typical use of this command:
`Declaring the needed arrays ARRAY INTEGER(tOverload;0) ARRAY INTEGER(tPos;0) ARRAY INTEGER(tLevel;0) ARRAY STRING(15;tArgName;0) ARRAY INTEGER(tType;0) ARRAY INTEGER(tDefSup;0) ARRAY INTEGER(tMode;0) ARRAY LONGINT(tSize;0) $Res:=OD Describe object (<>LoginID;"PK_GETEMP.P_GETEMP"; ->tOverload;->tPos;->tLevel; ->tArgName;->tType;->tDefSup;->tMode;->tSize)