ListConnector Method for LCSession
This method lists through all valid connectors for a LotusScript® Extensions (LC LSX) installation.
The identifyFlagList and identifyNameList parameters provide the ability to obtain information from a Connector about its supported functionality and naming used by the external system.
Defined In
LCSession
Syntax
Call thisSession. ListConnector (firstOrNext, connectorName, connectorCode, identifyFlagList, identifyNameList)
Parameters
Value |
Description |
---|---|
firstOrNext |
Long constant indicating whether to return the first or next connector property. |
LCLIST_FIRST -- Return information about the first connector. |
|
LCLIST_NEXT -- Return information about the next connector. |
|
connectorName |
String, output, optional. String representation of the connector name. |
connectorCode |
String, output, optional. The assigned connector code. |
identifyFlagList |
Stream, output, optional. The identifyFlagList is set to a stream of format number list (LCSTREAMFMT_NUMBER_LIST), which will contain a series of flags from the connector. Use the NumberListGetValue method of LCStream to retrieve individual flag values as required. The specific flags to retrieve are indicated by the index in the number list. Use the following constants to represent a particular set of flags (default is Nothing): |
LCIDFLAG_INDEX_CONNECTOR -- Connector flags LCIDENTIFYF_XXX |
|
LCIDFLAG_INDEX_ACTION -- Support actions for LCConnection.Action method LCACTIDENTF_XXX |
|
LCIDFLAG_INDEX_OBJECT_CATALOG -- Support objects for LCConnection.Catalog method LCOBJIDENTF_XXX |
|
LCIDFLAG_INDEX_OBJECT_CREATE -- Support objects for LCConnection.Catalog method LCOBJIDENTF_XXX |
|
LCIDFLAG_INDEX_OBJECT_DROP -- Support objects for LCConnection.Catalog method LCOBJIDENTF_XXX |
|
The following are the valid flag values. Each flag set is composed of zero or more of the corresponding flags ORed together: |
|
Supported Connector flags: |
|
LCIDENTIFYF_SINGLE_THREAD -- Connector is not thread safe. The LSX LC will properly serialize access to this connector to avoid threading problems. |
|
LCIDENTIFYF_ARRAY_READ -- Array reads (more efficient handling of RecordCount > 1 for Fetch method) are supported. |
|
LCIDENTIFYF_ARRAY_WRITE -- Array writes (more efficient handling of RecordCount > 1 for Insert, Update, and/or Remove methods) are supported. |
|
LCIDENTIFYF_SINGLE_METADATA -- All data is represented by a single metadata (for example, the File connector has only one metadata description). |
|
LCIDENTIFYF_WRITEBACKWriteback functionality is available. |
|
LCIDENTIFYF_SCROLLING -- Scrolling result sets are available (currently not supported by any connectors). |
|
LCIDENTIFYF_MULTI_VALUE -- Multi-value types (Binary stream formats for text, number, and datetime lists) are fully supported by the external system. |
|
LCIDENTIFYF_MULTI_DIMENSION -- Multi-dimensional result sets are supported (nested fieldlists). |
|
LCIDENTIFYF_SQL -- SQL is the back-end-supported syntax. |
|
LCIDENTIFYF_SRVDB_CAT_CONNECT -- Database connection is required for server and/or database browsing. |
|
LCIDENTIFYF_DISABLE_WRITEBACK -- (Metaconnector only) The use of this metaconnector does not allow writeback result sets. |
|
Supported action flags: |
|
LCACTIDENTF_RESET -- Reset action is supported. |
|
LCACTIDENTF_TRUNCATE -- Truncate action is supported. |
|
LCACTIDENTF_COMMIT -- Commit action is supported. |
|
LCACTIDENTF_ROLLBACK -- Rollback action is supported. |
|
LCACTIDENTF_CLEAR -- Clear action is supported. |
|
LCACTIDENTF_WAIT -- Wait action is supported. |
|
Supported object flags: |
|
LCOBJIDENTF_SERVER -- The method supports server objects. |
|
LCOBJIDENTF_DATABASE -- The method supports database objects. |
|
LCOBJIDENTF_METADATA -- The method supports metadata objects. |
|
LCOBJIDENTF_PROCEDURE -- The method supports procedure objects. |
|
LCOBJIDENTF_INDEX -- The method supports index objects. |
|
LCOBJIDENTF_FIELD -- The method supports field objects. |
|
LCOBJIDENTF_PARAMETER -- The method supports parameter objects. |
|
LCOBJIDENTF_ALT_METADATA -- The method supports alternate metadata objects. |
|
LCOBJIDENTF_ALT_FIELD -- The method supports alternate metadata field objects. |
|
identifyNameList |
Stream, output, optional. The identifyNameList is set to a stream of format text list (LCSTREAMFMT_TEXT_LIST), which will contain a series of names used by the connector's external system. This can be used to customize the presentation of options for a specific connector (for example, metadata is named Form for Notes®, and Table for DB2®). Use the TextListGetValue method of LCStream to retrieve individual names as required. The specific name to retrieve is indicated by the index in the text list. Use the following constants to represent a particular name (default is Nothing): |
LCIDNAME_INDEX_SERVER -- Name for server objects in this external system. |
|
LCIDNAME_INDEX_DATABASE -- Name for database objects in this external system. |
|
LCIDNAME_INDEX_USERID -- Name for user ID objects in this external system. |
|
LCIDNAME_INDEX_PASSWORD -- Name for password objects in this external system. |
|
LCIDNAME_INDEX_METADATA -- Name for metadata objects in this external system. |
|
LCIDNAME_INDEX_PROCEDURE -- Name for procedure objects in this external system. |
|
LCIDNAME_INDEX_INDEX -- Name for index objects in this external system. |
|
LCIDNAME_INDEX_FIELD -- Name for metadata fields in this external system. |
|
LCIDNAME_INDEX_PARAMETER -- Name for procedure parameters in this external system. |
|
LCIDNAME_INDEX_ALT_METADATA -- Name for alternate metadata objects in this external system. |
|
LCIDNAME_INDEX_ALT_FIELD -- Name for alternate metadata fields in this external system. |
Example
Option Public
Uselsx "*lsxlc"
Sub Initialize
Dim session As New LCSession
Dim conName As String
Dim text As String
REM List the connectors available.
REM The parameters for connector code, identity flags, and
REM identity names are optional and omitted in this example.
Call session.ListConnector(LCLIST_FIRST, conName)
text = conName
While session.ListConnector(LCLIST_NEXT, conName)
text = text + ", " + conName
Wend
Print "The usable Connectors are " & text.
End Sub
Example Output
The usable Connectors are db2, notes, odbc2, oracle, sybase.