L
Larry
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.
Thanks,
Larry
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.
Thanks,
Larry