i will tell my requirement. i have a tran. window there i will select a chart number of a patient and do some changes and will go to next window for doing some other modification for the same patient, and again will go to other window. by this time don't allow other users to access the same patient chart number. should get a message like record locked by some other user.
Once you close the recordset, the lock(s) will no longer exist (there will still be a shared lock on the database but that will not prevent updates from occuring). Also, ado does not actually change the locking until you have referenced one of the fields in your sql select statement. That is why you have a begintrans/committrans/rollbacktrans methods for your connection object.