Programming with Reflection

image\rwnprg32.gif ConnectionType property

 

Syntax

object.ConnectionType
object.ConnectionType = Value

Works with

image\r124.gif

Data type

String

 

Description

Returns (first syntax line) or specifies (second syntax line) the connection type.

The values are BEST-NETWORK, TELNET, VT-MGR, LAT, RLOGIN, SECURE SHELL, MODEM, DEMONSTRATION, NONE, COM1, COM2, COM3, COM4, COM5, COM6, COM7, and COM8. (These strings are not case-sensitive.)

For example:

 Session.ConnectionType = "BEST-NETWORK"

When you use this property to set a connection type, all connection settings for that type (that is, all settings you can configure with the ConnectionSettings property) are reset to their default values.

If you're writing a procedure that manipulates the current data connection settings, you may want to determine the current connection type with this property before making changes to the connection settings. After determining the current connection type, you can use the ConnectionSetting method to retrieve the value of a single connection keyword token, or the ConnectionSettings property to retrieve or set any or all of the connection keyword tokens.

If a connection is already active and you try to set the connection type, a runtime error results. You should either trap the error with an error-handing routine, or use the Connected property to first determine if a connection is active.

Values

The default value is "BEST-NETWORK."

 

image\jump.gif Example

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this property