Access Pass thru Query to Oracle Stored Procedure.

L

Larry

I am having problems passing an output paramater and I would like to know how
to test the returned output paramater from an oracle stored procedure.

This is the error message that I am receiving:
[Microsoft][ODBC driver for Oracle][Oracle]ORA-06550: line 1, column 31:
PLS-00363: expression '0' cannot be used as an assignment target
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

The following code is ruinning from an Access 2003 application:

Function callStoredProcLogin() As Boolean
Dim db As DAO.Database
Dim qdf As DAO.QueryDef



On Error GoTo Err_Execute

Set db = CurrentDb()
Set qdf = db.CreateQueryDef("")
'test
x = 1000
qdf.Connect = "ODBC;DSN=Oracle_Poc;UID=" & userid & ";PWD=" & passwrd & _
";SERVER=" & CONNSERVER & ""

qdf.SQL = "BEGIN USERLOGIN(" & "'" & userid & "'" & "," & "'" & passwrd &
"'" & ",0)" & "; END;"


qdf.ReturnsRecords = False
qdf.Execute 'dbFailOnError

Set qdf = Nothing
callStoredProcLogin = True
Exit Function

Err_Execute:
Select Case Err
Case 3146 To 3299
For Each objErr In DBEngine.Errors
MsgBox objErr.Description
Next
Case Else
MsgBox Err.Description
End Select
callStoredProcLogin = False
End Function

I am passing a 0 as my output paramater, but I only care about the return
value.


The stored procedure returns the value correctly when testing from oracle.

How to I get this to run correctly and how do I test the return value from
Access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top