CHAPTER 2 LCCONNECTION CLASS

LookupProperty Method for LCConnection
This method determines if a connector supports a specified property.

Defined In

LCConnection

Syntax

flag = lcConnection.LookupProperty(propertyToken, dataType, propertyFlags, propertyName)

Parameters
ParameterDescription
propertyTokenA token identifying the Connection property. See Appendix B for a list of property tokens.
dataTypeLong. Output optional. The property data type.
propertyFlagsLong. Output optional. The property flags from the following list.
LCPROPERTYF_CONNECT: Property is used for connecting.
LCPROPERTYF_BOOLEAN: Property is a boolean value.
LCPROPERTYF_READONLY: Property is read-only.
LCPROPERTYF_TEXTLIST: Property is a text list.
propertyNameString. Output optional. The name of the property.

Return Value
ValueDescription
flagInteger. TRUE or FALSE, indicating whether the property is supported for this connection.

Example

Option Public

Uselsx "*lsxlc"

Sub Initialize

  Dim connect As New LCConnection ("oracle")

  ' note that a connect is not necessary to list and look up properties

  ' the parameters are optional, to text for the existence of a property

  ' simply provide the TOKEN parameter

  If (connect.LookupProperty (LCTOKEN_SERVER)) Then

    Print "Oracle has a 'Server' property"

  Else

    Print "Oracle does not have a 'Server' property"

  End If

  If (connect.LookupProperty (LCTOKEN_DATABASE)) Then

    Print "Oracle has a 'Database' property"

  Else

    Print "Oracle does not have a 'Database' property"

  End If

End Sub

Example Output
Oracle has a 'Server' property.

Oracle does not have a 'Database' property.



Feedback on Help or Product Usability?