-
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
-
Can you explain your meaning of "execution fails". Any error messages.
A return value is not the same thing as an output parameter.