There is no way to lock a record (or table or index or page or any other SQL 'object') using programming techniques. SQL locks are created by SQL while executing different queries (transactions). You can learn a lot about locking here:
http://technet.microsoft.com/en-us/library/ms190615(v=sql.105).aspx[
^]
That all means that you have to develop (or find on the web) a solution for yourself...The main ideas are:
1. Record the PK of the row to lock
2. Check your records upon access
3. Clean record when appropriate (explicit release or time-out)