﻿<?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 Application Framework - V1 » Business Objects and Data Access (How do I?)  » Capturing the OUTPUT from an Insert Sproc</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 16:03:10 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Capturing the OUTPUT from an Insert Sproc</title><link>http://forum.strataframe.net/FindPost13514.aspx</link><description>[quote]I have to consider just taking the framework out of the equation alltogether and just write the insert code by hand and then reload back.[/quote]&amp;nbsp; &lt;/P&gt;&lt;P&gt;I think that's what you're going to have to do... without some significant changes to the framework, there is no way for us to retrieve only one field of a compound primary key value when that one field is auto-incremented.</description><pubDate>Thu, 17 Jan 2008 09:12:04 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>Capturing the OUTPUT from an Insert Sproc</title><link>http://forum.strataframe.net/FindPost4521.aspx</link><description>Hi Folks&lt;/P&gt;&lt;P&gt;The insert stored procs created by the DDT return&amp;nbsp; the SCOPE_IDENTITY value. How do I capture this using the .SAVE() method?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Clay</description><pubDate>Thu, 17 Jan 2008 09:12:04 GMT</pubDate><dc:creator>Clayton Hoyt</dc:creator></item><item><title>RE: Capturing the OUTPUT from an Insert Sproc</title><link>http://forum.strataframe.net/FindPost13501.aspx</link><description>Any advice? I have to consider just taking the framework out of the equation alltogether and just write the insert code by hand and then reload back.</description><pubDate>Wed, 16 Jan 2008 18:32:58 GMT</pubDate><dc:creator>Wil Cantrell</dc:creator></item><item><title>RE: Capturing the OUTPUT from an Insert Sproc</title><link>http://forum.strataframe.net/FindPost13332.aspx</link><description>How? What do you write in the stored proc?&lt;P&gt;Here is a brief example of the stored proc I'm using. Where do I get the value of @AutoIncrementField in my BO if it's not in the mapped field after a Save()?&lt;/P&gt;&lt;P&gt;[codesnippet]ALTER&amp;nbsp; PROCEDURE [x].[myProc]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @AutoIncrementField INT OUTPUT,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @foreignkeyfield UNIQUEIDENTIFIER,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @value1 INT,&lt;BR&gt;&amp;nbsp;@value2 INT&lt;BR&gt;AS&lt;BR&gt;INSERT INTO [X].[myTable]&lt;BR&gt;(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreignkeyfield&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value1,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value2&lt;BR&gt;)&lt;BR&gt;VALUES&lt;BR&gt;(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @foreignkeyField,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @value1,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @value2&lt;BR&gt;)&lt;BR&gt;SET @AutoIncrementField = @@IDENTITY[/codesnippet]</description><pubDate>Wed, 09 Jan 2008 13:47:51 GMT</pubDate><dc:creator>Wil Cantrell</dc:creator></item><item><title>RE: Capturing the OUTPUT from an Insert Sproc</title><link>http://forum.strataframe.net/FindPost13215.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I had this same issue. But I solved it by using stored procedures, where you can return values through output parameters.</description><pubDate>Tue, 01 Jan 2008 13:27:48 GMT</pubDate><dc:creator>Alagarsamy Rajamannar</dc:creator></item><item><title>RE: Capturing the OUTPUT from an Insert Sproc</title><link>http://forum.strataframe.net/FindPost13212.aspx</link><description>Lets say we have a composite primary key and one of the fields is auto increment, how do we get the value back from SQL? I can not set PrimaryKeyIsAutoIncrementing to true with a composite key.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;</description><pubDate>Sun, 30 Dec 2007 17:27:18 GMT</pubDate><dc:creator>Wil Cantrell</dc:creator></item><item><title>RE: Capturing the OUTPUT from an Insert Sproc</title><link>http://forum.strataframe.net/FindPost4524.aspx</link><description>Is this a trick question? :D&amp;nbsp; Once saved, the BO will contain this value in each of the rows that were updated in the Primary Key field.&amp;nbsp; This is done automatically (by default) when the PrimaryKeyIsAutoIncrementing property is set to True on a BO.</description><pubDate>Wed, 15 Nov 2006 10:54:56 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>