Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a numeric value
Message
From
21/02/2005 14:34:57
 
 
To
All
General information
Forum:
Oracle
Category:
Triggers, Sequences and Stored Procedures
Title:
Returning a numeric value
Miscellaneous
Thread ID:
00988972
Message ID:
00988972
Views:
61
Hi All,

I'd like to be able to return a value from an Oracle Procedure or Function. Either or doesn't matter. This has to be done using SQL passthrough. Here's as far as I've gotten in a simple test.
LOCAL lnFirstNo, lnSecondNo, lnReturnNo
lnFirstNo = 10
lnSecondNo = 15
lnReturnNo = 0

lcSqlStatement = "{ CALL Add_Two_Val(?lnFirstNo, ?lnSecondNo, ?lnReturnNo) }"
lnConHndl = sqlexec(lnSatHandle, lcSqlStatement)
This is the procedure I made.
CREATE OR REPLACE PROCEDURE Add_Two_Val(
   pnFirstNum  IN NUMBER,
   pnSecondNum IN NUMBER,
   pnRetValue IN OUT NUMBER)
IS
BEGIN
  pnRetValue := pnFirstNum + pnSecondNum;
END;
/
What am I missing?

TIA
Mike

VFP6 SP5 Oracle 8i
Next
Reply
Map
View

Click here to load this message in the networking platform