Error with Insert and Update Stored Procs adnd TimeStamp Columns


Author
Message
choyt
choyt
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: Forum Members
Posts: 78, Visits: 246
Hi Folks

I am using the DDT to create my DML sprocs.

All of my tables have an integer identity field as the PK and a TimeStamp column named RowVersion for use with concurrency.  When I generate the sprocs using the DDT, I get this error on all of the Update and Insert statements (the deletes work fine)

Cannot insert an explicit value into a timestamp column. use INSERT with a column list to exclude the timestampe column, or insert a DEFAULT.

I tried setting the default to 0 in the DDT table structure interface but get a broken rule.

I understand why I'm getting this error but not sure what to do about it. When using  TimeStamps, do I need to do this piece manually?

Thanks!

Clay

choyt
choyt
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: Forum Members
Posts: 78, Visits: 246
Hi Folks

Here are 2 screencaps of the error.


Larry Caylor
Larry Caylor
StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
Under the Strataframe CRUD settings for your business object make sure you set the UpdateConcurrencyType property to OptimisticTimestamp and entered the column name that contains the timestamp in the RowVersionOrTimestampColumn.


choyt
choyt
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: Forum Members
Posts: 78, Visits: 246
Thanks Larry

Unfortunately, the problem is in generating the stored procedures themselves and not in the business objects.

I'm thinking that this is a bug in the stored procedure generator. It sounds to me like the generator is trying to Insert into and Update the TimeStamp column.

Clay

StrataFrame Team
S
StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
In the table properties, where you check the boxes to generate the stored procedues, did you set the concurrency type on Update (and maybe delete if you want) to Optimistic Timestamp?  And you also have to specify the field in the combo box at the bottom to tell what field is the row version column (so that it gets left out off the inserts and updates).
choyt
choyt
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: Forum Members
Posts: 78, Visits: 246
Hi Ben

Attached is  the table properties I have setup.


Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yeah, you have Optimistic Row Version selected.  You need to make it Optimistic Time Stamp to produce the stored proc you are needing.
choyt
choyt
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: Forum Members
Posts: 78, Visits: 246
Thanks Folks

That did the trick. Appreciate the help!

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