LCConnection の LookupProperty メソッド

このメソッドは、Connector が指定されたプロパティをサポートしているかどうかを判断します。

定義位置

LCConnection

構文

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

パラメータ

パラメータ

説明

propertyToken

コネクションのプロパティを識別するトークン。プロパティトークンの一覧については、付録 B を参照してください。

dataType

Long。出力 (オプション)。プロパティのデータ型。

propertyFlags

Long。出力 (オプション)。プロパティフラグには次のものがあります。

 

LCPROPERTYF_CONNECT: プロパティは接続に使用されます。

 

LCPROPERTYF_BOOLEAN: プロパティは Boolean 値です。

 

LCPROPERTYF_READONLY: プロパティは読み込み専用です。

 

LCPROPERTYF_TEXTLIST: プロパティはテキストリストです。

propertyName

String 型。出力 (オプション)。プロパティの名前。

戻り値

説明

flag

整数。TRUE または FALSE。プロパティがこのコネクションでサポートされているかどうかを示します。

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

出力例

Oracle has a 'Server' property.
Oracle does not have a 'Database' property.