GetProperty Method for LCConnection
This method retrieves a copy of the current value for a connection property. Note that use of dynamic properties is more efficient. For example, this method returns the value of a Connector for DB2® property, specified by the PropertyToken parameter, in the DestField parameter. For DB2®, all properties are supported except Password.
If the property is not supported for the Connector, GetProperty will generate the error LCFAIL_INVALID_PROPERTY.
Defined In
LCConnection
Syntax
Set destField = thisConnection.GetProperty(propertyToken)
Parameters
Parameter |
Description |
---|---|
propertyToken |
Long. Token representing the connector property for which the value is returned. See Appendix B for a list of tokens. |
Return Value
Parameter |
Description |
---|---|
destField |
LCField. The value of the connection property whose token is propertyToken. |
Example
Option Public
Option Explicit
Uselsx "*lsxlc"
Sub Initialize
Dim connect As New LCConnection ("db2")
Dim conFld As LCField
' get the value of the server property
Set conFld = connect.GetProperty (LCTOKEN_WRITEBACK)
Print "The writeback property value is: " & conFld.text(0)
End Sub
Example Output
The writeback property value is: 0