PDA

Click to See Complete Forum and Search --> : Please help! DB locking issue!


harjeen
Aug 22nd, 2000, 11:34 AM
I have a web-based ActiveX application that allows a user to connect to an SQL Database to view and edit data. In order to populate the DataGrid in my app, I open an ADO recordset with a Keyset cursor and Optimistic Batch locking. All users of my application are logged on to the SQL Server under the same SQL user account.

When only one person uses that application, everything is grand, it works like a charm. When more people logon, however, trouble starts.

If the first user that logs on performs any modification to data in the grid (which runs some verification code and then calls the UpdateBatch method on the recordset), and a second user attempts to log on to the application, the second user receives the error 2147217871 (80040e21) which corresponds to a timeout when the application attempts to fetch the recordset. It seems like the first user establishes a lock on the database, which prevents any further users from loggin on. But this shouldn't happen, because I am using Optimistic Batch locking, right? If the first user that logs on to the system doesn't modify anything, a second user can log on just fine.

I would GREATLY appreciate any help on this subject. Thanks.

bar
Aug 22nd, 2000, 11:57 AM
I think your problem is with the SQL Server itself, because you are logging on with the same user account for each instance of the app running. Have you tried different user accounts? I might be wrong here as I've never tried logging onto the server from different workstations with the same user account.

harjeen
Aug 22nd, 2000, 12:02 PM
Thanks for the response.

Unfortunately, I have tried making another account, and having both users log in under the two separate accounts. However, the same problem occurs.