How to lock the sql area in vb

I have an update that I am going to do, however, I want to make sure
that no one has modified the records that I am about to update.

General logic:
Perform select statement and confirm that the row has not been changed
Update the sql database

From the time I perform the select until the time I update the database
someone else can get into the area and update it.

Do people usually handle this?  If so, how?

sql = "SELECT ModifiedDateTime From tblProcess WHERE ProcessName = name"
Set rs = objgDAL.Connection.Execute(sql)
If m_LoadDateLastModified <> rs!ModifiedDateTime Then            
              GoTo Err_Handler
End If
Set rs = Nothing
sql = " UPDATE tblProcess SET ProcessName = name"                    
objgDAL.Connection.Execute sql

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This issue is call Concurrency.  Google the set of following terms: Concurrency ADO timestamp

I found a few intro articles, but they're for .net, not classic VB.  Principles are the same.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
swansonplaceAuthor Commented:

Thank you for the information.  I was able to get a design that will work.  In my case, I will create a last modified time stamp and check if the timestamp has changed before my update.

Thanks alot.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.