﻿<?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?)  » InsertUsingStoredProcedure = True, leaves BO dirty</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 22 May 2026 20:09:48 GMT</lastBuildDate><ttl>20</ttl><item><title>InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18655.aspx</link><description>Hello, &lt;P&gt;I have a &lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f5080; FONT-FAMILY: Verdana"&gt;maintenance &lt;/SPAN&gt;form. All data operations&amp;nbsp;(update/insert/delete) used to work great, until I decided to handle inserts through a stored procedure. &lt;/P&gt;&lt;P&gt;Well, it's still kind of&amp;nbsp;works, but after new row is added and [b][u]Save[/u][/b] is clicked, BO state remains dirty no matter what. So when form is closing "Would you like to save changes" dialog is displayed, even though user&amp;nbsp;did click save before (many times).&lt;/P&gt;&lt;P&gt;Another thing I am noticing is that BO always&amp;nbsp;sees new row&amp;nbsp;as "New" even after Save is clicked and changes committed to the db, so if user clicks save multiple times it keeps adding the same record over and over again.&lt;/P&gt;&lt;P&gt;Please help. Thank you.</description><pubDate>Wed, 03 Sep 2008 10:35:12 GMT</pubDate><dc:creator>Leonard P.</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18975.aspx</link><description>[quote][b]Marcia G Akins (09/03/2008)[/b][hr]rof,l &amp;gt; and &amp;lt; lol &amp;gt;!!!! With Andy's involvement in this project as DBA, you can well imagine that his reastion would be "over my dead body!". When we were watching things in SQL Profiler, he was very upset at seeing the framework make direct calls to SP_ExecuteSQL.&lt;BR&gt;[/quote] &lt;P&gt;Hi Marcia,&lt;/P&gt;&lt;P&gt;Like in everything else, there are many ways to skin the cat, and once you get to know the tools available for SF (BOM,&amp;nbsp; DDT, RBS) and use them then you will see the light at the end of the tunnel :P These tools are design with automation in mind, so the application&amp;nbsp;can take care of itself&amp;nbsp;automatically or with your assistance but being easy on your part.&amp;nbsp;&amp;nbsp;&amp;nbsp;Please don't show this post to Andy :hehe:</description><pubDate>Wed, 03 Sep 2008 10:35:12 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18972.aspx</link><description>Hi Charles.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Don't know if you looked at the DDT very much, but the SMO approach to schema changes - and the ability to easily add that into the app ala Stonefield update is pretty impressive.&amp;nbsp; &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;lt; rof,l &amp;gt; and &amp;lt; lol &amp;gt;!!!! With Andy's involvement in this project as DBA, you can well imagine that his reastion would be "over my dead body!". When we were watching things in SQL Profiler, he was very upset at seeing the framework make direct calls to SP_ExecuteSQL.&lt;BR&gt;</description><pubDate>Wed, 03 Sep 2008 09:50:29 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18970.aspx</link><description>I think here you'll find the biggest surprises are in the area of "Oh my god, they are already handling that"  (e.g. bubbling up the sp errors, presenting a wizard to handle connection if one is not already established etc.)  Wait till you see the message service and localization stuff.  Roll based security very cool as well.  Don't know if you looked at the DDT very much, but the SMO approach to schema changes - and the ability to easily add that into the app ala Stonefield update is pretty impressive.  &lt;br&gt;
&lt;br&gt;
I hope after a year of using this you come to the training class next year (and bring Andy)  I think you'll get a real kick out of Trent and Ben and the rest of the crew.  (would really enjoy hearing Andy and Ben get into SQL esoterica :) )&lt;br&gt;
&lt;br&gt;
Anyway, I look forward to your insights and contributions here as I know you will bring a lot of experience and general common sense to using the product.&lt;br&gt;
&lt;br&gt;</description><pubDate>Wed, 03 Sep 2008 09:45:40 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18963.aspx</link><description>Hi Charles.&lt;/P&gt;&lt;P&gt;Well, having written my own VFP framework, I understand all too well that all frameworks make assumptions and in order to use the framework effectively, one has to understand what those assumptions are :D That is the learning curve and it can't be avoided.</description><pubDate>Wed, 03 Sep 2008 08:39:50 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18960.aspx</link><description>I for one am very glad to see you here.  I think we all agree good frameworks only get better when knowledgable, experienced and ... intense :D users bang on it and ask questions. &lt;br&gt;
&lt;br&gt;
As I said before, I think the more you get to know the framework - and especially the Microfour folks - the more you are going to be delighted.&lt;br&gt;</description><pubDate>Wed, 03 Sep 2008 08:26:54 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18925.aspx</link><description>Hi Dustin.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; As mentioned in the previous post, I'll include a note in the pertinent topics regarding SET NOCOUNT ON for the next release. Sorry for the confusion! &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;No worries :) I really am not rying to beat you up on this one. All in all, I am happy with my choice to go with Strataframe. It's a big product, so I expect to get a few bruises on the learning curve :)</description><pubDate>Tue, 02 Sep 2008 14:18:56 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18923.aspx</link><description>Marcia, &lt;/P&gt;&lt;P&gt;As mentioned in the previous post, I'll include a note in the pertinent topics regarding SET NOCOUNT ON for the next release. Sorry for the confusion! :)</description><pubDate>Tue, 02 Sep 2008 14:14:25 GMT</pubDate><dc:creator>Dustin Taylor</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18878.aspx</link><description>Hello Stataframe team Member:&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; you &lt;I&gt;can't&lt;/I&gt; use the SET NOCOUNT ON command at the top of your sproc (StrataFrame uses the count to determine the number of rows affected.) &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;It would be awfully nice if this were actually in the Stataframe documentation. Since my husband is a SQL Server DBA, he writes all of my stored procedures. I just happened to find this accidentally after a day of pulling my hair out for no reason.&lt;/P&gt;&lt;P&gt;Since best practice in SQL Server is to SET NOCOUNT ON at the beginning of every stored procedure to improve performance and to use @@RowCount to return the row count, my husband does not understand why the framework relies on NOCOUNT being off.&lt;/P&gt;&lt;P&gt;Marcia</description><pubDate>Mon, 01 Sep 2008 15:31:41 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18677.aspx</link><description>No problem, glad you got it working :)</description><pubDate>Fri, 22 Aug 2008 09:22:56 GMT</pubDate><dc:creator>Dustin Taylor</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18675.aspx</link><description>Dustin, It was mine SP. &lt;FONT color=#008000 size=2&gt;SET NOCOUNT ON &lt;FONT color=#111111&gt;was the probelm.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#111111 size=2&gt;Thank you&lt;/FONT&gt;</description><pubDate>Fri, 22 Aug 2008 09:12:14 GMT</pubDate><dc:creator>Leonard P.</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18668.aspx</link><description>Did you write these sprocs yourself or let the DDT generate them? If you wrote them yourself, you [i]can't[/i] use the SET NOCOUNT ON command at the top of your sproc (StrataFrame uses the count to determine the number of rows affected.)</description><pubDate>Fri, 22 Aug 2008 08:39:18 GMT</pubDate><dc:creator>Dustin Taylor</dc:creator></item><item><title>RE: InsertUsingStoredProcedure = True, leaves BO dirty</title><link>http://forum.strataframe.net/FindPost18667.aspx</link><description>As a temporary&amp;nbsp;work around I added code to _AfterSave even to accept changes on the current row:&lt;P&gt;[codesnippet]&lt;/P&gt;&lt;P&gt;&amp;nbsp; private void customReport_AfterSave(MicroFour.StrataFrame.Data.AfterSaveUndoEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach (DataRow row in customReport.CurrentDataTable.Rows)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (row.RowState == DataRowState.Added)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.AcceptChanges();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;I hope to find better way of handeling it&amp;nbsp;withing the Framework.</description><pubDate>Fri, 22 Aug 2008 08:29:44 GMT</pubDate><dc:creator>Leonard P.</dc:creator></item></channel></rss>