Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    Philadelphia
    Posts
    8

    Unanswered: Oracle Stored Proc

    I'm trying to call an Oracle proc with ADO in VBA. When I run the following code, I get an error stating :
    "ODBC Driver does not support the requested properties."

    Can anyone tell me what is wrong with the code?

    Thanks.

    Dim ODSREPDB As New ADODB.Connection
    Dim ODSREPCMD As New ADODB.Command
    Dim CIF, PRODUCT_FLAG As New ADODB.Parameter

    Set objDB = New ADODB.Connection
    Set objcmd = New ADODB.Command

    ODSREPDB.Open "Driver={Oracle ODBC Driver};Dbq=mydb;Uid=myuserid;Pwd=mypassword;OPTIO N= & 1 + 2 + 8 + 32 + 2048 + 16384"

    ODSREPCMD.ActiveConnection = ODSREPDB
    ODSREPCMD.CommandType = adCmdStoredProc
    ODSREPCMD.CommandText = "SALES.CHASE_IMPORTLEADFILESTG" 'the name of my proc


    Set CIF = ODSREPCMD.CreateParameter("CIF", adNumeric, adParamInput)
    ODSREPCMD.Parameters.Append CIF
    CIF = 1234


    Set PRODUCT_FLAG = ODSREPCMD.CreateParameter("PRODUCT_FLAG", adNumeric, adParamInput)
    ODSREPCMD.Parameters.Append PRODUCT_FLAG
    CIF = "oma"


    'On Error Resume Next
    ODSREPCMD.Execute

  2. #2
    Join Date
    Oct 2003
    Location
    Philadelphia
    Posts
    8

    oracle stored proc

    Actually ,this:
    Set PRODUCT_FLAG = ODSREPCMD.CreateParameter("PRODUCT_FLAG", adNumeric, adParamInput)
    ODSREPCMD.Parameters.Append PRODUCT_FLAG
    CIF = "oma"

    Would be:
    Set PRODUCT_FLAG = ODSREPCMD.CreateParameter("PRODUCT_FLAG", adVariant, adParamInput)
    ODSREPCMD.Parameters.Append PRODUCT_FLAG
    PRODUCT_FLAG = "oma"


    and I get an error saying: "Parameter type is not supported."

    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
  •