Stored Procedures - General
 
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 )
      



Stored Procedures - GeneralExpand / Collapse
Author
Message
Posted 11/30/2005 4:27:39 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 01/13/2007 3:38:49 PM
Posts: 26, Visits: 235
Hi,

I have played around with the Database Toolkit and noticed the auto-generated stored procedures for Update and Insert actions. The Insert procedures return @@IDENTITY for the PK but we use SCOPE_IDENTITY() for total accuracy. We have found that returning @@IDENTITY can cause confusion ie., return the wrong value, particularly where inserts are made in triggers that are triggered by the initial insert. Any thoughts?

Is row versioning handled in any way for updates?

How is concurrency handled - after checking the generated stored procedures, there appears to be no specific provision made for row version conflicts or generally concurrency checking.

In Strataframe, is the mapping of business object properties to stored procedure parameters handled automatically?

Thanks,

-=Gary

Post #201
Posted 12/01/2005 8:53:25 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 06/17/2008 9:28:35 AM
Posts: 2,649, Visits: 1,863
Yes, the mapping of the DataColumns to the stored procedure parameters is handled automatically.

For concurrency, the auto-generated stored procedures do not handle concurrency in any way, shape, or form. In the Application Framework, if you set the concurrency to optimistic on a business object, it will not use stored procedures for updates, but rather, will dynamically build an update command that uses either "all fields" or a "timestamp column" for the concurrency. You could, of course also use transactions to implement pessimistic concurrency, but very few ever want to do that

On the @@IDENTITY vs SCOPE_IDENTITY(), we have considered using SCOPE_IDENTITY(), but @@IDENTITY will return the proper value unless you are inserting on multiple tables on the same connection. We have not, however, considered inserting new records on a trigger; we will consider this and most likely change to SCOPE_IDENTITY(). Thanks for the heads up.



www.bungie.net
Post #210
Posted 03/27/2006 9:36:00 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:13:06 AM
Posts: 4,104, Visits: 4,176
The framework now uses SCOPE_IDENTITY and has for some time now.  I thought I would just update this thread so anyone reading would know.
Post #742
« 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 5:58pm

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.