Does it have any sort of trigger concept. That's the old-style solution: put an update trigger on the table to increment a column value on each update. In concept that's all the "timestamp" type does in SQL Server, though it is far more performant than using triggers.
Failing that, you might need to just ensure that all your stored procedures do an increment of a column value. That not ideal, because forgetting to include that in a sproc will result in badness, but technically it could work.
Hi there,
Here's information for MySql. From version 5.0.* there are triggers so you can do as Rocky said, but if you don't need high resolution (less then one second) you can use DateTime or TimeStamp field and treat it as other columns. Just pay attention what happens if you don't have application server or time synchronisation on clients, because of the problem with different clock settings.
We don't use timestamp because we don't need it. We use a byte datatype and the update sproc look like this:
PROCEDURE usp_MyTable_UPD (@IdMyTable int, @Description nvarchar(100), @RowVersion tinyint OUTPUT) ASDECLARE @NewRowVersion
SET @NewRowVersion = (CASE WHEN @RowVersion = 255 THEN 0 ELSE @RowVersion+1 END)
UPDATE
MyTable SET Description = @Description , RowVersion = @NewRowVersionWHERE
IdMyTable = @IdMyTable AND RowVersion = @RowVersionIF
@@rowcount>0 SET @RowVersion = @NewRowVersion
As you can figure, we have a DAL layer that checks if RowVersion changes on every update.
Copyright (c) Marimer LLC