Concurrency is the manner in which UltraLite shares resources by allowing multiple connections at the same time. To handle concurrent requests properly, you must understand how UltraLite manages concurrency in the database:
Multiple databases A single UltraLite application can open multiple connections to separate databases. UltraLite can open the following connections: up to 8 databases on Palm OS and Symbian, and up to 32 databases for all other platforms.
Multiple applications The UltraLite database can only be opened by one process at a time. If you plan to support concurrency among multiple applications, choose the UltraLite Engine as your data management component. See Choosing an UltraLite data management component.
Multiple threads UltraLite supports multi-threaded applications. A single application can be written to use multiple threads, each of which can connect to the same or different databases. Ensure that you do not exceed the concurrent connection limits supported by UltraLite. These are:
16 concurrent connections for Palm OS and Symbian OS.
64 concurrent connections for all other platforms.
SQLCA impacts these limits
Typically, the number of SQLCAs you can use is restricted to 31. However, the UltraLite.NET API is implemented to use one SQLCA per database manager and one per connection. This means that when using this API, your connection limit is actually 30.
Multiple transactions/requests Each connection can have a single transaction in progress at any one time. Transactions can consist of a single request or multiple requests. Data modifications made during a transaction are not made permanent in the database until the transaction is committed. Either all data modifications made in a transaction are committed, or all are rolled back. See UltraLite transaction processing and isolation levels.
Synchronization Synchronization occurs on a separate connection. During the upload phase, UltraLite applications can access UltraLite databases in a read-only fashion. During the download phase, read-write access is permitted, but if an application changes a row that the download then attempts to change, the download fails and rolls back. You can disable access to data during synchronization by setting the Disable Concurrency synchronization parameter.If synchronization fails, UltraLite supports resumable downloads on all platforms. See Handling failed downloads.