Optimistic Locking in VB with Stored procedures
don't bother trying to work with timestamps in VB if you are trying to
control concurrency issues with users overwriting each others changes.
the best way is to create your own concurrencyID field in every table
and have your update sp's check the value to see if it's been
incremented or not. if the value in the table matches the value in the
recordset, your update sp increments the concurrencyID value at the
same time it updates the other fields. if not, it returns an error
code, which you can then program around. handling the issue yourself
is the only way to safely deal with concurrency issues. if you're
trying to do something else entirely, then post more details.
On Mon, 19 Jul 1999 17:41:41 +0100, Steve pillings
Quote:
>Hi everyone
>I am developing in VB and SQL Server 7 and need to find out whether
>there is any way that I can use optimistic locking using stored
>procedures and effectively off-line processing. I have managed to get
>the timestamp value into VB as a char and was thinking that I could
>convert it into BINARY in a stored procedure, but this don't seem to be
>working.
>Is there any good method for getting timestamps to and from Visual
>Basic, or is there a better way in which to do it? If anyone can help
>I'd be really grateful as I'm getting a little stressed with it.
>Any help appreciated
>Cheers
>Steve Pillings