Chris Whitcomb 6.Jul.11 09:31 AM a Web browser LC LSXLC LSX - All ReleasesWindows
I have a stored procedure that returns a count. I need to call this and get the returned value using LCLSX. I can either return the count as an out parameter to the stored procedure, or as a resultset - it doesn't matter.
No matter what I try, I can't seem to execute the stored procedure. I read somewhere that I can't get a resultset, so I'm currently trying to get the out param to work.
Sub Click(Source As Button)
On Error Goto errHandler
Dim con As New LCConnection ("Oracle")
Dim inParams As New LCFieldList
Dim paramBoxNum As LCField
Dim paramFolders As LCField
Dim resultCount As LCField
Dim results As New lcfieldlist
Dim uidoc As NotesUIDocument
Dim ws As New NotesUIWorkspace
Set uidoc = ws.CurrentDocument
Dim server As New LCField(LCTYPE_TEXT)
server.Value = "server"
Dim uid As New LCField(LCTYPE_TEXT)
uid.Value = "uid"
Dim password As New LCField(LCTYPE_TEXT)
password.Value = "password"
con.SetProperty LCTOKEN_SERVER, server
con.SetProperty LCTOKEN_USERID, uid
con.SetProperty LCTOKEN_PASSWORD, password
Dim procedure As New LCField(LCTYPE_TEXT)
procedure.Value = "ers.cwtest01"
con.SetProperty LCTOKEN_PROCEDURE, procedure
Set ParamBoxNum = inParams.Append("boxNum", LCTYPE_TEXT)
paramBoxNum.Text = uidoc.fieldgettext("BoxNum")
Set paramFolders = inParams.Append("folders", LCTYPE_TEXT)
Dim folders As String
folders = uidoc.fieldgettext("Folders")
If folders = "" Then
paramFolders.Text = " "
Else
paramFolders.Text = folders
End If
Set resultCount = results.Append("resultCount", LCTYPE_Text)
'resultCount.value = "0"
con.connect
If (con.Call(inParams, 1, results) = 0) Then
Msgbox "No results were generated"
Else
Msgbox "Results were generated"
End If
con.Disconnect
Exit Sub
errHandler:
con.disconnect
uidoc.FieldAppendText "results", "error: " + Cstr(Err) + ": " + Error
Exit Sub
End Sub
I get ORA-06550: line 1, column 7:PLS-00306: wrong number or types of arguments in call to 'CWTEST01'.
The signature for the stored procedure is:
CREATE OR REPLACE PROCEDURE ERS.CWTest01 (boxNum IN VARCHAR2,
folders IN VARCHAR2,
resultCount OUT varchar2)