Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking record between SQL statements - Newbie

Status
Not open for further replies.

ramdaskm

Programmer
Aug 1, 2000
1
US
Suppose I have <br>(a) SELECT a record with a particular field val<br>(b) UPDATE the fieldval on the record so that no other connection uses this record<br><br>How can I effectively lock the row during (a) so that no other connection can access this row till (b) is complete.<br><br>i.e. between (a) and (b) I don't want any other connection picking the same record.<br><br>RamdasKM<br>
 
You could use a table-level locking hint (such as UPDLOCK) in your SELECT statement.<br><br>For details, see the BOL topic: locking, table-level<br> <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top