views:

22

answers:

1

Hi, can anyone help me out.

By implementing countermeasures in solving the concurrency problem I got troubled with passing timestamps (rowversion) between Powerbuilder 7 datawindow and SQLServer 2008 (both ways) using insert and update stored procedures.

The connection is serviced by ODBC, not native. Most of my attempts result in casting poblems (convert). What to do?

Tnx

A: 

Instead of using a timestamp, just use an integer. The update stored procedure will then accept this as one of it's parameters and compare it against the one in the database. If they don't match, you can report back that "this record has been updated by another user, you will need to retrieve it before you can make further changes", if they do match, the update procedure just increments the version as part of the record update.

ninesided