The connection string can be supplied using a ULConnectionParms object.
The parameters used to open this connection should be a semicolon-separated list of keyword-value pairs. The default is an
empty string (an invalid connection string).
UL Ext: The parameters used by UltraLite.NET are specific to UltraLite databases and therefore the connection string is not compatible
with SQL Anywhere connection strings.
Parameter values can be quoted with either single quote characters or double quote characters provided that the quoted contents
do not contain quote characters of the same type. Values must be quoted if they contain semicolons, begin with a quote, or
require leading or trailing whitespace.
If you are not quoting parameter values, make sure that they do not contain semicolons, and that they begin with either a
single quote or a double quote character. Leading and trailing spaces in values are ignored.
By default, connections are opened with UID=DBA and PWD=sql. To make the database more secure, change the user DBA's password
or create new users (using the GrantConnectTo method) and remove the DBA user (using RevokeConnectFrom).
The following code creates and opens a connection to the existing database \UltraLite\MyDatabase.udb on a Windows Mobile device.
' Visual Basic
Dim openParms As ULConnectionParms = New ULConnectionParms
openParms.DatabaseOnDevice = "\UltraLite\MyDatabase.udb"
Dim conn As ULConnection = New ULConnection
conn.ConnectionString = openParms.ToString()
The following code is the C# language equivalent:
ULConnectionParms openParms = new ULConnectionParms();
openParms.DatabaseOnDevice = ".udb";
ULConnection conn = new ULConnection();
conn.ConnectionString = openParms.ToString();