How should I configure a timestamp column in a BO?


Author
Message
Peter Jones
Peter Jones
Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi,

I want to use a timestamp for concurrency control and I can't figure out how I should configure the timestamp field in the BO Mapper. Whatever I try causes either compile or runtime errors. What is the recommended way of configuring a timestamp in the BO Mapper and is there anything I should be doing in _SetDefaultValues to set an initial value for a new record?

Cheers, Peter

Replies
Peter Jones
Peter Jones
Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Trent,

Thanks for that - I didn't realise that SF actually handles the updating of the row version column. I will have to have a think about what's best to do. My initial thoughts are to stay with the TimeStamp column as it doesn't rely on the use of SF to keep track of things, for instance if we fire a stored proc to do some work then concurrency control is maintained without having to make sure the proc updates the row version as well as doing whatever other updating is needed.

Cheers, Peter

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Peter,



You have a good point about the user of sprocs and maintaining the row version column. Another issue to consider is the user of triggers. If you use triggers, it is actually better to use the row version (from what I've read) because with concurrency checking using either all rows or a timestamp, you end up having problems because SF can't keep up. I.e. if you have trigger that is fired and does an update of some table, the BO that is hitting the updated table will become out of date (as the timestamp will have changed or some data in the table will have changed) and will through a concurrency error. The forum posts all suggested using row version concurrency because the trigger typically wouldn't update the row version, and in many cases the trigger is maintaining some system controlled data anyway. There are posts about it in this forum and probably the issues forum. Try searching for concurrency or row version.



Hope this helps!



Greg
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I understand....just so you know, there is less that can go wrong using a row version versus a time stamp column.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Peter Jones - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Peter Jones - 18 Years Ago
Peter Jones - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Peter Jones - 18 Years Ago
Ivan George Borges - 18 Years Ago
Peter Jones - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Peter Jones - 18 Years Ago
Greg McGuffey - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Peter Jones - 18 Years Ago
Trent L. Taylor - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search