Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
UltraLite applications must connect to a database before carrying out operations on the data in it.
Most applications use a single connection to an UltraLite database and leave the connection open. Multiple connections are only required for multithreaded data access. For this reason, it is often best to declare the ULConnection object as global to the application.
The following properties of the ULConnection object govern global application behavior.
By default, UltraLite.NET applications are in AutoCommit mode. Each Insert, Update, or Delete statement is committed to the database immediately. You can use ULConnection.BeginTransaction to define the start of a transaction in your application.
You can change the user ID and password for the application from the default values of DBA and sql, respectively, by using methods. Each UltraLite database can define a maximum of four user IDs.
A set of objects governing synchronization is accessed from the Connection object.
UltraLite tables are accessed using methods of the Connection object.
A set of objects is provided to handle the execution of dynamic SQL statements and to navigate result sets.
Each ULConnection object and all objects created from it should be used on a single thread. If your application requires multiple threads accessing the UltraLite database, each thread requires a separate connection. For example, if you design your application to perform synchronization in a separate thread, you must use a separate connection for the synchronization and you must open the connection from that thread.