Subject: connect to oracle server
Install the Oracle 8 client on the Notes server. Somewhere in either the help file or the redbook it tells you exactly what Oracle versions are supported. We have the Oracle client 8.something installed on the LEI server and it works fine with Oracle 8 and 9i.
Then, if you want to use LEI to get the data, create an Oracle connection document.
If you want to use Lotusscript, which you can do from the client or server (this would have nothing to do with LEI), provided the Oracle client is installed:
Dim lccon As LCConnection
Dim lc_key_fieldlist As LCFieldList
Dim lc_result_fieldlist As LCFieldList
Dim fdt_issued As LCField
Dim count As Long
Dim i As Integer
Set lccon = New LCConnection(“oracle8”)
With lccon
.server = "yourserver"
.Metadata = "your.table"
.Fieldnames = "dt_issued"
.Userid = "xxxxxxxx"
.Password = "yyyyyyyyy"
End With
lccon.Connect
’ ******************************************************************************
’ All the LCfields added to this fieldlist will be key fields unless we
’ set their field flags manually.
’ ******************************************************************************
Set lc_key_fieldlist = New LCFieldlist(, LCFIELDF_KEY)
’ ******************************************************************************
’ Append an LCfield of type DateTime to the key fieldlist. In addition
’ to its being a key field (see above) it will also match value that are
’ greater than its value.
’ ******************************************************************************
Set fdt_issued = lc_key_fieldlist.Append(“dt_issued”, LCTYPE_DATETIME)
fdt_issued.Flags = LCFIELDF_KEY Or LCFIELDF_KEY_GT
fdt_issued.Value = Datenumber(2002, 12, 31)
’ ******************************************************************************
’ Create a fieldlist for the resultset.
’ ******************************************************************************
Set lc_result_fieldlist = New LCFieldList
’ ******************************************************************************
’ The count variable may contain LCCOUNT_UNKNOWN or -1; that’s ok.
’ ******************************************************************************
count = lccon.Select( lc_key_fieldlist, 1, lc_result_fieldlist)
’ ******************************************************************************
’ Bind the lc_dt_issued field to the dt_issued field in the resultset,
’ and step through the resultset.
’ ******************************************************************************
Set lc_dt_issued = lc_result_fieldlist.Lookup(“dt_issued”)
While (lccon.Fetch (lc_result_fieldlist) > 0)
i=i+1
Print Cstr(i)+ " "+lc_dt_issued.Text(0)
Wend
You can also use LCConnection.execute() which has simpler syntax.