GetParameter C++ - 08/15/00 08:03 PM
I have a PL/SQL procedure named p_AddCustomer inside a package named AddCustomerPackage.
It has three parameters: cust_id OUT, cust_name IN, cust_info IN. The cust_id value is a sequence using NEXTVAL.
This procedure works, and can be called successfully either from SQL Plus or from a
TOraclePackage component. (It is successful in that the record is written, the
sequence updates, and the proper fields are filled out with the proper values.)
The problem is, I can't get the cust_id back from GetParameter - the parameter doesn't update, it remains the value it was initialized.
C++ doesn't have any par-constants that I'm aware of, so I can't quite copy the example in the docs. What do I try next?
(I've tried with both positional and named parameters - changing the property in the
component each time - and get the same result either way)
here's the code:
int gCustID = 0;
Variant var[3] = {gCustID,passCustName,passCustInfo};
AddCustomerPackage->CallProcedure("p_AddCustomer",var,2);
gCustID = AddCustomerPackage->GetParameter(0);
Is GetParameter supposed to work on the procedure just called? If not, how do you
completely specify what procedure you are calling it on? (the package might
contain several procedures...)
TIA
It has three parameters: cust_id OUT, cust_name IN, cust_info IN. The cust_id value is a sequence using NEXTVAL.
This procedure works, and can be called successfully either from SQL Plus or from a
TOraclePackage component. (It is successful in that the record is written, the
sequence updates, and the proper fields are filled out with the proper values.)
The problem is, I can't get the cust_id back from GetParameter - the parameter doesn't update, it remains the value it was initialized.
C++ doesn't have any par-constants that I'm aware of, so I can't quite copy the example in the docs. What do I try next?
(I've tried with both positional and named parameters - changing the property in the
component each time - and get the same result either way)
here's the code:
int gCustID = 0;
Variant var[3] = {gCustID,passCustName,passCustInfo};
AddCustomerPackage->CallProcedure("p_AddCustomer",var,2);
gCustID = AddCustomerPackage->GetParameter(0);
Is GetParameter supposed to work on the procedure just called? If not, how do you
completely specify what procedure you are calling it on? (the package might
contain several procedures...)
TIA