﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Database Deployment Toolkit » Database Deployment Toolkit (How do I?)  » Stored Procedures - General</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 11:28:25 GMT</lastBuildDate><ttl>20</ttl><item><title>Stored Procedures - General</title><link>http://forum.strataframe.net/FindPost201.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;Is row versioning handled in any way for updates?&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;In Strataframe, is the mapping of business object properties to stored procedure parameters handled automatically?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-=Gary</description><pubDate>Mon, 27 Mar 2006 09:36:00 GMT</pubDate><dc:creator>Gary C Wynne</dc:creator></item><item><title>RE: Stored Procedures - General</title><link>http://forum.strataframe.net/FindPost742.aspx</link><description>The framework now uses SCOPE_IDENTITY and has for some time now.&amp;nbsp; I thought I would just update this thread so anyone reading would know.</description><pubDate>Mon, 27 Mar 2006 09:36:00 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Stored Procedures - General</title><link>http://forum.strataframe.net/FindPost210.aspx</link><description>Yes, the mapping of the DataColumns to the stored procedure parameters is handled automatically.  &lt;br&gt;
&lt;br&gt;
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 ;)&lt;br&gt;
&lt;br&gt;
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.</description><pubDate>Thu, 01 Dec 2005 08:53:25 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>