StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Error with Insert and Update Stored Procs...Expand / Collapse
Author
Message
Posted 07/23/2007 2:38:21 PM


StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 07/22/2008 9:04:54 PM
Posts: 76, Visits: 238
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

Post #10521
Posted 07/23/2007 3:02:06 PM


StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 07/22/2008 9:04:54 PM
Posts: 76, Visits: 238
Hi Folks

Here are 2 screencaps of the error.

Post #10522
Posted 07/24/2007 9:52:51 AM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/22/2008 6:38:11 PM
Posts: 355, Visits: 1,731
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.

Post #10525
Posted 07/24/2007 9:58:29 AM


StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 07/22/2008 9:04:54 PM
Posts: 76, Visits: 238
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

Post #10526
Posted 07/24/2007 10:18:53 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 9:05:01 AM
Posts: 2,666, Visits: 1,878
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).


www.bungie.net
Post #10529
Posted 07/24/2007 10:43:39 AM


StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 07/22/2008 9:04:54 PM
Posts: 76, Visits: 238
Hi Ben

Attached is  the table properties I have setup.

Post #10532
Posted 07/24/2007 11:10:25 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 8:12:17 AM
Posts: 4,243, Visits: 4,288
Yeah, you have Optimistic Row Version selected.  You need to make it Optimistic Time Stamp to produce the stored proc you are needing.
Post #10536
Posted 07/24/2007 11:40:43 AM


StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 07/22/2008 9:04:54 PM
Posts: 76, Visits: 238
Thanks Folks

That did the trick. Appreciate the help!

Post #10538
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 9:19am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.