>Hello,
>
> Im using SQL Statements to select, insert, delete and update my SQL Server tables. Well now i want to implement multiuser enviroment in my app.
>
> Well, I also want every time a user is in a record, noone can access to that record, and will receive a error msg instead.
It is considered a poor designed to lock records without needs (but I don't know all your needs so you may be right in your decision). You could add a dummy field to your table and place a bit (1) when you read it and reset it to 0 when you have finish. You will then need to read the bit and validate if it is 0 or 1 when you read a record.
My 2 cents are that I prefer a lot validate when needing to update data. Imagine if a user read a record (set the lock byte to 1) and go for lunch. The record will be lock for an hour or so!
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com