Transaction Locks

OLE DB Programmer's Reference

Locking is the process by which a DBMS restricts access to a row in a multiuser environment. Transactions lock rows to regulate their sharing and isolation.

Locking can occur with any of the methods that interact with rows on the data source. These include IRowsetLocate::GetRowsAt, IRowsetLocate::GetRowsByBookmark, IRowsetUpdate::Update, and others. These operations take locks and can wait for locks to be released by other transactions. A lock held by another transaction usually does not invalidate an operation, but the lock delays the operation until the other transaction has finished and released the lock. Therefore, the default behavior on encountering a lock is to queue until it is released. There is a time limit on how long to queue before returning with a time-out failure, and the time-out can be set to zero for infinite time-out. Various time-out settings can be chosen by setting transaction properties.

The data source object implements transaction locking by using a strategy that corresponds to the transaction isolation level. These strategies are specific to the data source object.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net