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

SQL Anywhere 10.0.1 » UltraLite - .NET Programming » UltraLite .NET 1.0 API Reference » ULConnection class

ULConnection constructor Next Page

ULConnection constructor


Initializes a ULConnection object with the specified connection string. The connection must be opened before you can perform any operations against the database.

Syntax

Visual Basic

Overloads Public Sub New( _
ByVal connectionString As String _
)

C#

public ULConnection(
string connectionString
);

Parameters
Remarks

To use the UltraLite Engine runtime of UltraLite.NET, set ULDatabaseManager.RuntimeType to the appropriate value before using any other UltraLite.NET API.

The connection string can be supplied using a ULConnectionParms object.

Exceptions
Example

The following code creates and opens a connection to the existing database \UltraLite\MyDatabase.udb on a Windows CE device.

' Visual Basic
Dim openParms As ULConnectionParms = New ULConnectionParms
openParms.DatabaseOnCE = "\UltraLite\MyDatabase.udb"
Dim conn As ULConnection = _
  New ULConnection( openParms.ToString() )
conn.Open()

// C#
ULConnectionParms openParms = new ULConnectionParms();
openParms.DatabaseOnCE = @"\UltraLite\MyDatabase.udb";
ULConnection conn = new ULConnection( openParms.ToString() );
conn.Open();
See also