In reference to your response on Record locking in ADO.NET, I would say this might hold true for most of cases, but let us take a scenario where I want to explicitly lock a record, and hold the lock till that user is working on that record. Can you please help me in this, be it Oracle or SQL Server?
I strongly advise against (and most DBA guys will also) to provide locks that depend on user interaction. It kills scalability (if not of the database, certainly of your application), and you will find yourself in a nightmare when an increasing number of users can't work because some other has left his work undone and gone to lunch, or worse, his workstation (or worse, YOUR application) crashed and now the lock mark will never cleared.
If you decide to go on (you have been warned), the simple approach (and the only one, I'm afraid) is for you to add a bit field to your 'lockable' tables and set it through application logic. There's no RDBMS built-in mechanism for this. Then your application just has to check this flag and warn the user.
Dig Deeper on Win Development Resources
Related Q&A from Daniel Cazzulino
Here Daniel Cazzulino explains how to load a DSL (domain specific language) domain model instance file programmatically. This requires the .NET type ... Continue Reading
Here we offer a glimpse at 12 of .NET development expert Danny Cazzulino's top ASP.NET questions and answers. Continue Reading
C# developers should NOT be modifying InitializeComponent method in the code-behind (or any of the variable definitions) by hand. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.