
Q: DAO 3.5 w/ODBCDirect call Oracle SP w/Output Params
All,
I have an Oracle 7.3 stored procedure defined as follows:
create or replace procedure rk3(data_in IN NUMBER, data_out OUT NUMBER)
IS
BEGIN
data_out := data_in * 2;
END;
/
I am using the 2.0 Oracle ODBC Driver which is Level 2 Compliant.
My VB Application is using DAO 3.0
I have cut most of the fat in my function, but here it is, in a nutshell:
Public Sub Test
Dim qrySP As QueryDef
Dim nResult As Integer
Dim oConnection As Connection
DBEngine.DefaultType = dbUseODBC
Set oConnection = Workspaces(0).OpenConnection("", , False,
"ODBC;DSN=DATABASE;UID=USER;PWD=PASS;")
End If
Set qrySP = oConnection.CreateQueryDef("robk", "{call rk3(?, ?)}")
qrySP.Parameters(0).Value = 10
qrySP.Parameters(1).Direction = dbParamOutput
qrySP.Execute
nResult = qrySP.Parameters(1)
qrySP.Close
End Sub
When the qrySP.Execute executes, I get error 3146 -- ODBC Call Failed.
I've tried Oracle's web site, Microsoft's Web Site and the Technet CD, as
well as the VB5 docs and some other books. I'm at wits end.
Any ideas?
Thanks in advance for any help.
Rob Konigsberg