Option Public Option Explicit Use "OpenLogFunctions" Uselsx "*lsxlc" Sub Initialize On Error Goto ErrorHandler Dim LCSess As New LCSession("leisess") Dim conn As New LCConnection ("oracle") ' Set the connection parameters (instance name, userid and password) conn.Server = "server_connection_name" conn.UserId = "APPS" conn.Password = "password" ' Connect to the database conn.Connect ' Set the stored procedure owner and stored procedure name conn.Owner = "APPS" conn.Procedure = "XXET_ROBSTEST.create_project" ' Declare input parameters, in this case the project number Dim Params As New LCFieldList Dim Param As LCField Set Param = Params.Append("p_project_number", LCTYPE_TEXT) Param.Text = "C1234" ' Declare output parameters, in this case the project number and return code Dim OutputParams As New LCFieldList Dim OutputParam1 As New LCField(1, LCTYPE_TEXT) Dim OutputParam2 As New LCField(1, LCTYPE_TEXT) conn.Fieldnames = "P_PROJECT_NUMBER, P_RETCODE" Dim Count As Long Count = conn.Call(Params, 1, OutputParams) ' Fetch parameter(s) into the output_parms fieldlist Count = conn.Fetch (OutputParams) ' Retrieve the return code from the list of output parameters Set OutputParam1 = OutputParams.GetField (1) Set OutputParam2 = OutputParams.GetField (2) Dim Message As String Message = |P_PROJECT_NUMBER = "| & OutputParam1.Text(0) & |", P_RETCODE = "| & OutputParam2.Text(0) & |".| Messagebox(Message) conn.Disconnect Exit Sub ErrorHandler: Dim ErrorText As String If (LCSess.Status <> LCSUCCESS) Then ErrorText = LCSess.GetStatusText & Chr(10) & "Error occured on line " & Erl() & "." Else ErrorText = Error$ & Chr(10) & "Error occured on line " & Erl() & "." End If Messagebox ErrorText, 0, "The following LotusScript error has occurred" conn.Disconnect Resume ExitAfterError ExitAfterError: End Sub