LOTUS CONNECTORS


New Method for LCConnection
This is the constructor for objects of class LCConnection.

Defined In

LCConnection

Syntax

Dim connectionName As New LCConnection(libraryName) ' DECS only

or

Dim connectionName As New LCConnection(ConnectionDocumentName) ' LEI Scripted Activity agents only

Parameters
ParameterDescription
libraryNameThe name of a valid, installed connector, such as db2 or oracle, and the db2.lcx or oracle.lcx exists in the Notes/Domino directory. A metaconnector name may also be used (order, meter, and so on).

Note Use lowercase letters for libraryName, as some file systems are case-sensitive. See the LCSession.ListConnectors method, which is used to determine the installed Connectors.

ConnectionDocumentNameThe name of a valid Connection Document that exists in the LEI Administrator.

Usage Notes

The following considerations are helpful when working with the New method for LCConnection.


Example

' DECS only

Dim MyNewConnectionName as New LCConnection("oracle")

 

' LEI scripted agents only

Dim MyNewConnection as New LCConnection("OracleConnDoc")

' with the "order" metaconnector

Option Public

Option Declare

Uselsx "*lsxlc"

Sub Initialize

Dim birthdayTable As New LCConnection("order")

Dim flds As New LCFieldList

Dim i As Integer

With birthdayTable

.ConnectorName = "db2"

.Database = "STATS" ' local database, no userid.

.Metadata = "BIRTHDAYS"

.OrderNames = "BIRTH_DATE" ' order metaconnector will sort by this field.

.Connect

.Select Nothing, 1, flds

Do While birthdayTable.Fetch(flds)

For i = 1 To flds.FieldCount

Print flds.GetName(i) & " = " & flds.GetField(i).Text(0)

Next

Loop

End With

End Sub

Example Output
FIRSTNAME = Anapest

LASTNAME = Jones

BIRTH_DATE = 04/03/1901

FIRSTNAME = Ozymandias

LASTNAME = Miller

BIRTH_DATE = 02/20/1979

FIRSTNAME = Chlorine

LASTNAME = Foss

BIRTH_DATE = 09/01/1980