General information
Category:
Triggers, Sequences and Stored Procedures
Hi,
Easiest way is with a function although stored procs work. I think there is some links about it here somepleace. But off the top of my head something like below will work..
LOCAL lnFirstNo, lnSecondNo, lnReturnNo
lnFirstNo = 10
lnSecondNo = 15
lnReturnNo = 0
lcSqlStatement = "select Add_Two_Val(?lnFirstNo, ?lnSecondNo, ?lnReturnNo) ReturnVal from dual"
lnConHndl = sqlexec(lnSatHandle, lcSqlStatement,"Add_Two_Val")
lnReturnNo=Add_Two_Val.ReturnVal
CREATE OR REPLACE FUNCTION Add_Two_Val(
pnFirstNum NUMBER,
pnSecondNum NUMBER) RETURN NUMBER IS
BEGIN
RETURN pnFirstNum + pnSecondNum;
END;
/
HTH
Tim
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only