ASA Database Administration Guide
Connecting to a Database
Connecting to a database using OLE DB
ADO is an object-oriented programming interface. In ADO, the Connection object represents a unique session with a data source.
You can use the following Connection object features to initiate a connection:
The Provider property that holds the name of the provider. If you do not supply a Provider name, ADO uses the MSDASQL provider.
The ConnectionString property that holds a connection string. This property holds an Adaptive Server Anywhere connection string, which is used in just the same way as the ODBC driver. You can supply ODBC data source names, or explicit UserID, Password, DatabaseName, and other parameters, just as in other connection strings.
For more information about connection parameters, see Connection parameters.
The Open method initiates a connection.
For more information about ADO, see ADO programming with Adaptive Server Anywhere.
The following Visual Basic code initiates an OLE DB connection to Adaptive Server Anywhere:
' Declare the connection object Dim myConn as New ADODB.Connection myConn.Provider = "ASAProv" myConn.ConnectionString = "Data Source=ASA 9.0 Sample" myConn.Open