If you're using SqlServer, you can use a DATATYPE called "timestamp".
A timestamp is a value that increments each time a record is updated. You
don't have to manually do this, it just happens.
Create Table dbo.Employee (EmpID int , RowVers timestamp , LastName
varchar(24 ) )
INSERT INTO dbo.Employee ( EmpID , LastName ) values ( 101, 'Jones' )
INSERT INTO dbo.Employee ( EmpID , LastName ) values ( 102, 'Smith' )
INSERT INTO dbo.Employee ( EmpID , LastName ) values ( 103, 'Gates' )
Select * from dbo.Employee
Select EmpID , convert ( int , RowVers ) as RowVersAsInt , LastName from
dbo.Employee
Converting to an int the easiest way to deal with this.
When you load an Employee (for possible edit) ...... you also persist (on
the webpage , or as custom business entity), the RowVersInt value.
Then when you update the Employee, you check to see if the RowVersInt has
changed.
@EmpID int
@LastName varchar(24)
@RowVersInt int
if exists (Select * from dbo.Employee e where e.EmpID = @EmpID and
convert(int , e.RowVers) <@RowVersInt )
begin
err.raise 'Ahhhhhhhh, somebody already updated this employee',
.........................
end
something like that.
<cm******@hotmail.comwrote in message
news:11**********************@11g2000cwr.googlegro ups.com...
if 2 people are working on the same web site is it possible to be able
to work on it Simultaneously so that if i for example was to change
something it would change on the other persons screen after a refresh