OpenConnection
Syntax
object.OpenConnection sConnName, sConnStr
sConnName
String
that represents a connection name.
sConnStr
String that specifies a connection string to be passed to
ELS-QB.
It may be the empty string if SetConnection function had been used to
define the proper connection string prior to calling OpenConnection..
Description
Call
this method to define and open a new dynamic connection specified by the sConnStr connection string.
Remarks
OpenConnection
method returns True if the connection string variable is well defined and the
connection has been opened successfully, otherwise returns
False.
Example
This following code demonstrates how to create, save and
close connectiondynamically
in ELS-QB component..
‘.........................
Dim
sConnName, sConnStr
sConnName
= “Northwind”
‘
Sample connection string
sConnStr = “Provider=SQLOLEDB.1;Persist Security Info=
False;” & _
“UserID=sa;Initial
Catalog=Northwind;Data Source=SERVER1”
If
ELS_QBCtrl.OpenConnection(sConnName, sConnStr)
Then
ELS_QBCtrl.SaveConnection
ELS_QBCtrl.CloseConnection
End
If