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

SAP Sybase SQL Anywhere 16.0 » UltraLite - .NET Programming » UltraLite.NET application development » Connection setup for an UltraLite database

 

Connecting to an UltraLite database

Use the ULConnectionParms object to connect to an UltraLite database named mydata.udb.

Prerequisites

There are no prerequisites for this task.

 Task
  1. Declare a ULConnection object.

    ULConnection conn;
  2. Open a connection to an existing database.

    You can specify connection parameters either as a connection string or using the ULConnectionParms object.

    ULConnectionParms parms = new ULConnectionParms();
    parms.DatabaseOnDesktop = "mydata.udb";
    conn = new ULConnection( parms.ToString() );
    conn.Open();

Results

A connection to the mydata.udb database is established.

Next

Use the database connection to perform SQL operations that create, modify, or delete data. You can modify existing database options on an open connection. Close the ULConnection object when finished.