Returning a value from Oracle via OLEDB (in ASP)

Discussion in 'ASP General' started by CJM, Jan 10, 2008.

  1. CJM

    CJM Guest

    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
    CJM, Jan 10, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nic

    Querying Excel via OLEDB

    Nic, Oct 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    684
    Ken Cox [Microsoft MVP]
    Oct 5, 2004
  2. =?Utf-8?B?cGV0cm8=?=
    Replies:
    5
    Views:
    4,355
    =?Utf-8?B?cGV0cm8=?=
    Nov 21, 2005
  3. Replies:
    0
    Views:
    731
  4. Racker

    Connect mysql via oledb

    Racker, Sep 1, 2008, in forum: .NET
    Replies:
    0
    Views:
    347
    Racker
    Sep 1, 2008
  5. Feyruz
    Replies:
    4
    Views:
    2,134
    Sherm Pendley
    Oct 14, 2005
Loading...

Share This Page