Results 1 to 2 of 2

Thread: Connecting to Oracle

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Posts
    23

    Connecting to Oracle

    Below is the code I've tried for running the Oracle Stored Proc. There are no input parameters, but there is one output parameter. The code execution
    fails:

    ===========

    Dim OracleConn As ADODB.Connection
    Dim strCnn As String
    Dim cmd As ADODB.Command

    On Error GoTo err_ProcessExtract

    Set OracleConn = New ADODB.Connection
    Set cmd = New ADODB.Command

    strCnn =
    "ODBC;DATABASE=LCMP_DEV.OBBPROD7;UID=CM_APP_OWNER;PWD=dworadev;DSN=lcmpdev4"

    OracleConn.Open strCnn

    cmd.ActiveConnection = OracleConn

    cmd.CommandType = adCmdStoredProc

    cmd.CommandText = "{ ? call cm_fadv_process2.transfer_tblcmparam}"
    cmd.Parameters(0).Direction = adParamReturnValue

    cmd.Execute

    MsgBox "Return values: " & cmd.Parameters(0).Value

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    Can you explain your meaning of "execution fails". Any error messages.

    A return value is not the same thing as an output parameter.

Posting Permissions

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



Click Here to Expand Forum to Full Width