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,

For anyone interested setting the timestamp column in the BO Mapper to "Return Alternate on Null" with a return value of "Nothing" seems to work ok.

Cheers, Peter

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,

Yes, I've done all that - my question was: "I can't figure out how I should configure the timestamp field in the BO Mapper."

For instance, if I use "nullable generic" I get :Error 1 Type argument '1-dimensional array of Byte' does not satisfy the 'Structure' constraint for type parameter 'T'

If use Return Alternate on Nulls/Set Alternate on null (value type) and set the alternate to Nothing I get Error 1 Operator '<>' is not defined for types '1-dimensional array of Byte' and '1-dimensional array of Byte'. Use 'Is' operator to compare two reference types.

I was hoping you could have just save me from just trying things until I stumbled across the right combination.

Cheers, Peter

 


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
All you need to do is create the time stamp column, edit the BO through the component designer (double-click the BO) and set the ConcurrencyMode to OptimisticTimeStamp and then set the RowVersionOrTimeStamp column with the name of your field.

Note: This is outlined step-by-step in the help documentation and goes into much more detail than I have here.  I recommend looking at the documentation for a more replete answer.

Help Documentation
Application Framework -> Business Layer -> Common Business Object Tasks -> Implementing Concurency

There is a link at the top that says "Optimistic Using a Timestamp Field"

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

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search