Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » SQL Anywhere .NET 2.0 API Reference » SAConnection class » SAConnection constructors

SAConnection() constructor Next Page

SAConnection(String) constructor


Initializes an SAConnection object. The connection must then be opened before you can perform any operations against the database.

Syntax

Visual Basic

Public Sub New( _
ByVal connectionString As String _
)

C#

public SAConnection(
string connectionString
);

Parameters
Example

The following statement initializes an SAConnection object for a connection to a database named policies running on a SQL Anywhere database server named hr. The connection uses the user ID admin and the password money.

SAConnection conn = new SAConnection(
"UID=admin;PWD=money;ENG=hr;DBN=policies" );
conn.Open();
See also