Post by bWFyZW » Thu, 12 Feb 2004 17:31:07

Dear All

Please help in finding out what I'm doing wrong
I'm trying to lock a record on SQL server using ODBC connectio
in a chosen table.
I define a sql query string. Then I open a query usin
Open api on my CRecordset object (say oRS
then accrding to recommedation of MSDN on setLockMod
I'm tring to execute


and then locking would be to execut


Unfortunatelly I got an exception from
with an errorCode 1012 and a message "Requested lock mode
is not supported""

Can anyone explain me why is it so? Is it possible that SQL server
ODBC drive doesn't support such a mode of locking. Or rather
am I doing something wrong

Any help appreciate

1. SetLockingMode(CRecordset::pessimistic) gives me a Runtime Error

2. Pessimistic locking

This must be a common question, but I don't know the

If a form has record locking set to No Locks and the user
tries to update fields into a locked record, his input is
accepted, then discarded when the optimistic lock fails,
after displaying a dialog box indicating the record is
locked and by whom.

If the form has record locking set to Edited Record, input
is not accepted, and the user simply sees an unresponsive
form with no feedback. When viewing the form as a dataset,
the user sees an interdit symbol as soon as anything is
input. In the same fashion, how can the form view react to
the first input and display a locked message?

3. Does pessimistic locking prevent others from read ?

4. Pessimistic Locking of a Database.

5. Pessimistic concurrency question

6. Once more - Pessimistic Locking ADO.NET 2.0 SQL Server 2005

7. More than pessimistic record locking needed...

8. MS Project 2000 - Gantt Chart with Pessimistic and Optimistic

9. links in optimistic and pessimistic Gantt charts

10. How can I schedule with optimistic and pessimistic date?

11. PERT Entry Optimistic, Expected, and Pessimistic "Gantt" Charts

12. pessimistic locking

13. Show person locking/editing the record in the form with pessimistic lock?

14. What providers do pessimistic locking?

15. Implement ADO.NET Row Level Pessimistic Locking