Description
Sets the isolation level to use when connecting to the database.
In multiuser databases, transactions initiated by different users can overlap. If these transactions access common data in the database, they can overwrite each other or collide.
To prevent concurrent transactions from interfering with each other and compromising the integrity of your database, you can set the isolation level when you connect to the database. Isolation levels are used by .NET Framework data providers when performing a transaction.
PowerBuilder uses the Isolation database parameter to allow you to set various database lock options. Each value corresponds to an isolation level defined in the .NET Framework.
When to specify the Isolation value
You must set the Isolation value before you connect to the database. The Isolation value takes effect only when the database connection occurs. Changes made to the Isolation value after the connection occurs have no effect on the current connection.
Applies to
ADO.NET
Syntax
Isolation='value'
Parameter |
Description |
---|---|
value |
A string specifying the isolation level. Values correspond to members of the .NET Framework IsolationLevel enumeration:
|
Default value
The default lock value depends on how your database is configured. For information, see your DBMS documentation.
Examples
Example 1
To set the Isolation value to RC (Read Committed):
-
Development environment
Select Read Committed from the Isolation Level drop-down list in the Database Profile Setup dialog box.
-
Application
Type the following:
SQLCA.DBParm="Isolation='RC'"
Using the example in code
If you specify Isolation Level in your database profile, the syntax displays on the Preview page in the Database Profile Setup dialog box. You can copy the syntax from the Preview page into your code.