Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    2

    Unhappy Unanswered: How can I call a store procedure with a recordset parameter ?

    I maked a store procedure at Oracle 8 that have a InputOutput object as parameter, I donīt know how the exact form to pass my recordset to this store procedure. I tried to use this VB code below. The error happens at line 'Call .Parameters.Append(vfRsEmb)'

    Dim AdoParam1 As ADODB.Parameter

    With AdoComm
    .CommandText = "{call PROEX.KPP_LFE.PPP_INSTPP_EMBARQUE_AUX(?)}"
    .CommandType = adCmdText
    Set AdoParamRet = .CreateParameter("Retorno", adUserDefined, adParamInputOutput)

    Call .Parameters.Append(vfRsEmb)
    Call .Execute

    End With

    '------

    Do I need to put hear the SP code ?

    thanks ...

  2. #2
    Join Date
    Sep 2003
    Posts
    2

    Re: How can I call a store procedure with a recordset parameter ?

    make sure that:
    1. Provider=OraOLEDB.Oracle or {Oracle ODBC Driver};
    2. cmd.Properties("PLSQLRSet") = True

    3.if you have 2 param
    and one of them is recordset
    then your commandText
    must include only 1 ?(question mark)


    '=================================

    Originally posted by dmsousa
    I maked a store procedure at Oracle 8 that have a InputOutput object as parameter, I donīt know how the exact form to pass my recordset to this store procedure. I tried to use this VB code below. The error happens at line 'Call .Parameters.Append(vfRsEmb)'

    Dim AdoParam1 As ADODB.Parameter

    With AdoComm
    .CommandText = "{call PROEX.KPP_LFE.PPP_INSTPP_EMBARQUE_AUX(?)}"
    .CommandType = adCmdText
    Set AdoParamRet = .CreateParameter("Retorno", adUserDefined, adParamInputOutput)

    Call .Parameters.Append(vfRsEmb)
    Call .Execute

    End With

    '------

    Do I need to put hear the SP code ?

    thanks ...

  3. #3
    Join Date
    Sep 2003
    Posts
    2

    Re: How can I call a store procedure with a recordset parameter ?

    sorry!

    set rs=cmd.execute 'to get the recordset


    '=======================
    ===================
    Originally posted by dmsousa
    I maked a store procedure at Oracle 8 that have a InputOutput object as parameter, I donīt know how the exact form to pass my recordset to this store procedure. I tried to use this VB code below. The error happens at line 'Call .Parameters.Append(vfRsEmb)'

    Dim AdoParam1 As ADODB.Parameter

    With AdoComm
    .CommandText = "{call PROEX.KPP_LFE.PPP_INSTPP_EMBARQUE_AUX(?)}"
    .CommandType = adCmdText
    Set AdoParamRet = .CreateParameter("Retorno", adUserDefined, adParamInputOutput)

    Call .Parameters.Append(vfRsEmb)
    Call .Execute

    End With

    '------

    Do I need to put hear the SP code ?

    thanks ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •