Returning a value from Oracle via OLEDB (in ASP)

C

CJM

Bit of a noob question I'm afraid... I've had a look on t'interweb and it
has got me so far, but I'm doing something wrong.

I've managed to run procedures with an output parameter, but a return value
from a function is sufficiently different to stump me.

Set oParam = .CreateParameter("iSequenceNo", adInteger, adParamReturnValue)
..Parameters.Append oParam

Set oParam = .CreateParameter("sSerialNo", adVarchar, adParamInput, 50,
sSerialNo)
..Parameters.Append oParam

Set oParam = .CreateParameter("sPartNo", adVarchar, adParamInput, 50,
sPartNo)
..Parameters.Append oParam

..CommandText= "{? = Call
IFSAPP.Part_Serial_History_API.Get_Latest_Sequence_No(?, ?)}"
..Execute()

..Parameters.Delete "sSerialNo"
..Parameters.Delete "sPartNo"

I understand in this scenario that the Return Value must be the first
parameter supplied.
When I run my code, it completes without any errors, but iSequenceNo is not
populated. I assume the problem is the way in which I am calling the
function, but I'm not sure what exactly is wrong.

Any help would be appreciated.

Thanks

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top