How to lock the sql area in vb
Posted on 2006-04-10
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.
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
Set rs = Nothing
sql = " UPDATE tblProcess SET ProcessName = name"