Update Using Stored Procedure Issue
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


12»»

Update Using Stored Procedure IssueExpand / Collapse
Author
Message
Posted 07/11/2007 4:38:17 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/03/2008 11:10:36 AM
Posts: 355, Visits: 1,720
I've run into an issue with update stored procedures generated by DDT are not matching up with the update parameter list created by the framework. I have a table with a non-identity integer pk and a SQL timestamp column that I've configured in DDT to generate insert and update procs.

After mapping the table to an object in BO mapper I've dropped it on a form and set the appropriate properties to use stored procedures for update and insert, set auto ncrement pk = false and configured the BO to use optimstic timestamp concurrency.

When I run the app inserts work. When I try to update I get an error stating the update procedure has too many arguments specified. Looking at the parameters that were generated in debug mode, it shows a "..._ORGPK" parameter containing the original pk value. It would appear that the framework is failing to recognize that timestamp concurrency is being used and is not supressing the original pk parameter or DDT is failing to include it in the proc.

-Larry

Post #10210
Posted 07/11/2007 5:25:24 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/03/2008 11:10:36 AM
Posts: 355, Visits: 1,720
I did a little more checking and found that DDT is not adding the original pk value parameter (_ORGPK) to any of the update procs, regardless of the data type.

-Larry

Post #10212
Posted 07/17/2007 7:21:56 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/03/2008 11:10:36 AM
Posts: 355, Visits: 1,720
Did this one get missed?
Post #10395
Posted 07/18/2007 8:43:29 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 06/17/2008 9:28:35 AM
Posts: 2,649, Visits: 1,863
Yep, it sure did get overlooked... I'm checking it right now, Larry.


www.bungie.net
Post #10403
Posted 07/18/2007 8:52:10 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 06/17/2008 9:28:35 AM
Posts: 2,649, Visits: 1,863
OK, looks like this is a DDT problem... it should be adding PK_ORG to the parameter list, just in case anyone wants to change their primary key on a record (which they can since it's not an IDENTITY column... if you want to change it you might have a design problem, but by allowing this, we cover all of the bases).  I'll fix the DDT and post the update here (there seems to be a lot of DDT fixes in the last few days ).


www.bungie.net
Post #10406
Posted 07/18/2007 9:01:37 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 06/17/2008 9:28:35 AM
Posts: 2,649, Visits: 1,863
OK, here's the fix that now properly includes the _ORG pk value in the update sproc.


www.bungie.net


  Post Attachments 
ddt.zip (8 views, 750.04 KB)
Post #10407
Posted 07/18/2007 12:55:32 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/03/2008 11:10:36 AM
Posts: 355, Visits: 1,720
Thanks Ben. That fixed the problem. Looks like there were some other changes too. I was having an issue with role base security that went awaywhen I redeployed the database using the new DDT.

-Larry

Post #10413
Posted 07/19/2007 9:09:50 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 06/17/2008 9:28:35 AM
Posts: 2,649, Visits: 1,863
Hrm... no idea what that could have been, but yeah, the last few days have been DDT days... several fixes made their way in


www.bungie.net
Post #10446
Posted 08/07/2007 4:17:51 PM