Hi ,i have a very problem for running a stored procedures with lsxlc, it’s a program which I found in documents IBM and which I modified according to my needs, i’m in diffuclty, please HELP !!
Dim sess As New LCSession
Dim s As notessession
Dim db As NotesDataBase
Dim conn As New LCConnection (“oracle8”)
'declare any fields and fieldlists for input/output data…
Dim input_fieldlist As New LCFieldList
Dim output_parms As New LCFieldlist
Dim out As Double
'set the connection parameters…
conn.Server = "MySERVER"
conn.UserId = "MySERVER"
conn.Password = "MyPW"
'connect to the database…
conn.Connect
’ name of stoerd procedure (PL/SQL),
conn.Procedure = “SP_AVEC_PARAMS”
%rem
there are 2 param output and one param input (select …where…)
stored procedures param’s are the same name as here
p_date : type = date
p_statut : type = TEXT
p_num_ano : type = Integer
%endrem
'declare any fields and fieldlists for input/output data…
Dim p_num_ano As New LCField (1, LCTYPE_INT)
Dim p_statut As New LCField (1, LCTYPE_TEXT)
Dim p_date As New LCField (1, LCTYPE_DATETIME)
'Dim p_statut As LCField
'Dim p_date As LCField
'set the input parameters of the stored procedure…
’ “NUMERO_ANO” is the name of field input in my dabase
Set p_num_ano = input_fieldlist.Append (“NUM_ANO”, LCTYPE_INT)
p_num_ano.Value = 100
'the declared output_parms fieldlist
’ will hold the output parameters of the stored procedure…
out = conn.Call (input_fieldlist, 1, output_parms)
'fetch parameter(s) into the output_parms fieldlist…
out = conn.Fetch (output_parms)
'retrieve the parameter(s) from the output_parms fieldlist…
Set p_statut = output_parms.GetField (2)
Set p_date = output_parms.GetField (1)
'use the output parameter value(s) in your script...
Print "Output parameter 1 is " & p_statut.Value(0)
Print "Output parameter 2 is " & p_date.Text(0)
conn.Disconnect
end sub
I have an error : type mismatch
HELP