<p>My work has a financial application, written in <code>VB.NET</code> with <code>SQL</code>, that several users can be working on at the same time.</p>

<p>At some point, one user might decide to Post the batch of entries that they (and possibly other people) are currently working on.</p>

<p>Obviously, I no longer want any other users to <strong>add</strong>, <strong>edit</strong>, or <strong>delete</strong> entries in that batch <strong>after</strong> the <strong>Post process</strong> has been initiated.</p>

<p>I have already seen that I can lock <strong>all</strong> data by opening the SQL transaction the moment the Post process starts, but the process can be fairly lengthy and I would prefer not to have the Transaction open for the several minutes it might take to complete the function.</p>

<p>Is there a way to lock just the records that I know need to be operated on from VB.NET code?</p>

add
```
```
with (rowlock)
```
```
to your SQL query
SQL Server Performance article
EDIT:
ok, I misunderstood the question. What you want is transaction isolation. +1 to Joel :)