PreviousNext
Help > Easycom .NET > Easycom namespace > EasycomConnection > EasycomConnection Constructor
EasycomConnection Constructor

 Creates a new instance of an EasycomConnection object, which represents an open connection to a specified AS/400.

Class EsycomConnection

 

Syntax

EasycomConnection.EasycomConnection(System.String sConnString)

EasycomConnection.EasycomConnection()

 

Description

Parameter

Description

Type

connectionString

Specifies the connection string, including the necessary parameters to connect using Easycom. See EasycomConnection.ConnectionString property for options available in this connection string.

String

 

You need to explicitly open and close connections using the Open and Close methods, respectively.

Another way to instantiate an EasycomConnection object is to instantiate an EacConnection object (because EacConnection derives from EasycomConnection).

Because this connection can be "pooled", when you close the object (using .Dispose() or .Close() method) the physical connection may remain open.

 

Example of use (C#)

EasycomConnection my_cnx;

 

           my_cnx = new EasycomConnection();

           my_cnx.ConnectionString = "Server=194.206.160.111;User. "

           my_cnx.Open();

 

Example of use (VB)

 

Dim my_cnx As EasycomConnection

 

my_cnx = New EasycomConnection

my_cnx.ConnectionString = "Server=194.206.160.111;User"

my_cnx.Open()