I was curious to know, how would one perform Pessamistic Table (Not Record) Locking using ADO.Net?
I have searched high and low on the internet for some examples and I am coming up empty handed.
Reason:
I have an Client/Server application, where when a Client loads, it checks a table in the database to determine if an update to some data is needed. If so, it goes ahead and begins modifying another table in the database. Problem is that if two or more Clients load simultaneously, all the clients involved could be performing the same routine on the same Table/Records, which I am assuming might cause some problems. So I was hoping to find a way to immediatly "lock" a table so that only one Client is allowed to do the update, and all other clients seeing the lock, realize that they don't need to perform the update. Then the other Clients just wait until the lock is release before proceeding to read the table's data.
Help....please...
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rich Cook