Contents Index DropDatabaseWithParms method OpenConnectionWithParms method

UltraLite for MobileVB User's Guide
  UltraLite for MobileVB API Reference
    ULDatabaseManager class

OpenConnection method


Prototype 

OpenConnection( connparms As string ) As ULConnection
Member of UltraLiteAFLib.ULDatabaseManager

Description 

If a database exists, use this method to connect to the database. If a database does not exist, or the connection parameters are invalid, the call will fail. Use the error object to determine why the call failed.

The function returns a ULConnection object which provides an open connection to a specified UltraLite database. The database filename is specified using the connparms string. Parameters are specified using a sequence of name=value pairs. If no user ID or password is given, the default is used.

It should contain a value of the form

file_name=UDBFILE
DBF=UDBFILE
palm_db=CreatorID.
Parameters 

connparms    The parameter used to establish a connection to a database. Parameters are specified as a semicolon separated list of keyword=value pairs. If no user ID or password is given, the default is used.

Note for Palm users  
The Palm_fs=vfs parameter needs to be specified both for CreateDatabase and OpenConnection methods when using a database on the Palm virtual file system.
Returns 

For more information about the Palm_fs parameter, see palm_fs parameter .

The ULConnection object is returned if the connection was successful.

Example 

The following example creates a new database connection from the CustDB sample application:

Set Connection = DatabaseMgr.OpenConnection(
"file_name=d:\Dbfile.udb;palm_db=Syb3;CE_file=\myapp\MyDB.udb")

Contents Index DropDatabaseWithParms method OpenConnectionWithParms method