Cannot update , table locked problem 
Author Message
 Cannot update , table locked problem

I am facing a problem in which when i try and edit a record using
CDatabase::ExecuteSQL an exception is thrown saying that the table is
locked. this is the scenario in which it happens.

1. using ADO Connection i am adding a the record in Table T1.

2. I query the table for the same record added in T1 using CRecordset
passing it a database object at some point.

3. using the same CDatabase in step 2 at some other point i am trying to
edit the same record.

This scenario is running in a contiuous mode and works but sometimes i get
an exception while the step 3 is getting executed saying that the table im
trying to update is locked.

All the Database connections are always kept open ( both ADO Connection and
the CDatabase connection).

My questions:
1. Any reasons why is this happening ?

2. Any solution or is there any way i can ensure if the table is not  kept
locked .

3. Any call that i can make to check if a table is locked or not.


Sun, 18 Apr 2004 13:03:58 GMT
 [ 1 post ] 

 Relevant Pages 

1. Cannot update , table locked problem

2. Cannot update , table locked problem

3. SQL 2.10.03 problem: cannot UPDATE table

4. SOLVED: SQL 2.10.03 problem: cannot UPDATE table

5. update lock causing an unrelated table index to be locked

6. Record Locking/Table Update problems

7. lock table & update cursors problems

8. Record Locking/Table Update problems

9. Problem with Table-Level Locks in Update Query

10. Update locks in multi-table update statements

11. Cannot update table through Enterprise manager (open table)

12. SQL Server update error: row cannot be update for updating

Powered by phpBB® Forum Software