Oracle® Objects for OLE C++ Class Library Developer's Guide 10g Release 2 (10.2) Part Number B14308-01 |
|
Applies To
Description
This method returns a specified OParameter object.
Usage
OParameter GetParameter(int index) const
OParameter GetParameter(const char *pname) const
Arguments
Arguments |
Description |
---|---|
index | An index from 0 to OParameterCollection.GetCount()-1. |
pname | The name of the parameter, as stated when the parameter was created with Add. |
OParameter objects are obtained either by name or index from an OParameterCollection object. The OParameterCollection object is obtained from an ODatabase with the GetParameters method.
Return Value
An OParameter object which will be open on success, closed on failure.
Example
This example checks the status of the "deptno" parameter.
// we have an open ODatabase named odb OParameterCollection params = odb.GetParameters(); OParameter pdeptno = params.GetParameter("deptno"); pstatus = pdeptno.GetStatus();