﻿<?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 » Issues  » AllowMultipleModifiedRecords problem</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 13 Jun 2026 08:38:30 GMT</lastBuildDate><ttl>20</ttl><item><title>AllowMultipleModifiedRecords problem</title><link>http://forum.strataframe.net/FindPost29375.aspx</link><description>I need to allow the end user to delete several specific records&amp;nbsp;from a table using a maintenance form toolstrip before any of those deletions&amp;nbsp;are propagated back to the database.&amp;nbsp; Then when they click the Save button, I need all of the&amp;nbsp;deletions to be sent to the database all at once.&lt;br/&gt;&lt;br/&gt;I set the maintenance form toolstrip property named AllowMultipleModifiedRecords to True and I made sure the business object's property named IncludeInFormDelete was set to True.&amp;nbsp; Unfortunately each deletion is propagated to the database as soon as the user clicks the Delete button and confirms that they want to delete the record.&lt;br/&gt;&lt;br/&gt;I stepped through the StrataFrame code and I have found that the problem is in the cmdDelete_Click subroutine in the maintenanceformtoolstrip.vb file.&amp;nbsp; That method checks the business object's EditingState and only sets llRemoveAtServer to False if the EditingState is not Idle.&amp;nbsp; I do not understand why the editing state is being tested at all.&lt;br/&gt;&lt;br/&gt;Is this another bug?&amp;nbsp; Is there a simple workaround?&lt;br/&gt;&lt;br/&gt;Sam Tenney</description><pubDate>Fri, 21 Jan 2011 07:25:03 GMT</pubDate><dc:creator>Sam Tenney</dc:creator></item><item><title>RE: AllowMultipleModifiedRecords problem</title><link>http://forum.strataframe.net/FindPost29415.aspx</link><description>Speed kills :).&amp;nbsp;&amp;nbsp;I'm actually going to pull Trent in and make sure I'm not missing the boat on why they checked the idle state on that function.&amp;nbsp; When they wrote it they went through the extra trouble of checking the idle state there, I want to be sure they weren't accounting for some scenario I'm just not thinking of. &lt;br/&gt;&lt;br/&gt;Regardless, feel free to change your local source to the single line. It will be a bit more efficient than the loop and, as you pointed out,&amp;nbsp;now that we aren't checking the idle state there the loop isn't needed.&lt;br/&gt;&lt;br/&gt;If they point out something we weren't thinking of, I'll let you know. Otherwise, we'll likely change this function to the single line execution to match the rest of the Adds/Edits/etc. </description><pubDate>Fri, 21 Jan 2011 07:25:03 GMT</pubDate><dc:creator>Dustin Taylor</dc:creator></item><item><title>RE: AllowMultipleModifiedRecords problem</title><link>http://forum.strataframe.net/FindPost29412.aspx</link><description>Oops,&lt;br/&gt;&lt;br/&gt;I meant:&lt;br/&gt;&lt;br/&gt;Me.ParentForm.Delete(_AllowMultipleModifiedRecords, True)&lt;br/&gt;&lt;br/&gt;Sam Tenney</description><pubDate>Thu, 20 Jan 2011 14:52:20 GMT</pubDate><dc:creator>Sam Tenney</dc:creator></item><item><title>RE: AllowMultipleModifiedRecords problem</title><link>http://forum.strataframe.net/FindPost29411.aspx</link><description>Hi Dustin,&lt;br/&gt;&lt;br/&gt;Sorry about the empty email.&amp;nbsp; I intended to point out several other problems with that subroutine, but I accidently sent it before describing the problems.&amp;nbsp; Now I don't have sufficient time today to fully explain the problems, but I can quickly mention that scanning through all business objects without checking the forms property named "IncludeInFormDeleteType" seems wrong to me.&amp;nbsp; Perhaps the form's subroutine named "GetListOfDeleteBOs" could be used to limit the scanning of uninvolved business objects.&amp;nbsp; Actually we could probably replace all the code in the cmdDelete_Click subroutine with the following code because "_AllowMultipleModifiedRecords" is associated with the maintenance form toolstrip and is not affected by any business object.&amp;nbsp; Here is the entire code (it is just an untested idea from a beginner):&lt;br/&gt;&lt;br/&gt;Me.ParentForm.Delete(_AllowMultipleModifiedRecords)&lt;br/&gt;&lt;br/&gt;I can provide a detailed argument and analysis tomorrow if you are interested.&lt;br/&gt;&lt;br/&gt;Sam Tenney</description><pubDate>Thu, 20 Jan 2011 14:48:38 GMT</pubDate><dc:creator>Sam Tenney</dc:creator></item><item><title>RE: AllowMultipleModifiedRecords problem</title><link>http://forum.strataframe.net/FindPost29405.aspx</link><description>Sam,&lt;br/&gt;&lt;br/&gt;I got an e-mail notification from you with no content. Was there something else you needed here?&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;&lt;br/&gt;Dustin</description><pubDate>Thu, 20 Jan 2011 12:55:56 GMT</pubDate><dc:creator>Dustin Taylor</dc:creator></item><item><title>RE: AllowMultipleModifiedRecords problem</title><link>http://forum.strataframe.net/FindPost29404.aspx</link><description>You're right, there is no reason to check for the idle state there. I'm suprised this hasn't been caught before but, regardless, we've made the change and it will be in the next build.&lt;br/&gt;&lt;br/&gt;In the mean time, feel free to make the same change to your local strataframe source code so it doesn't hold up your development.&amp;nbsp; Here is the cmdDelete_Click handler within the MaintenanceFormToolStrip after the change has been made:&lt;br/&gt;&lt;br/&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;font color=#008000 size=2 face=Consolas&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;[code]Private Sub cmdDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdDelete.Click&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Establish Locals&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim loBO As BusinessLayer&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim llRemoveAtServer As Boolean = True&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Cycle through the business objects on the delete and see if they are idle&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each loBO In Me.ParentForm.BusinessObjects&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If loBO.IncludeInFormDelete Then&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; '-- Modified on 1/20/2011 --&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; '-- Removed the requirement that the editing state not be idle in order to mark the row as deleted (rather than immediately deleting the record)&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&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; If _AllowMultipleModifedRecords Then&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; llRemoveAtServer = False&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; End If&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Treat the delete differently if more than a single record can be added at&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- a time.&amp;nbsp; If more than a single record can be modified, then the delete&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- should not be committed back to the server until the Save or Undo is called.&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.ParentForm.Delete(Not llRemoveAtServer, True)&lt;br/&gt;End Sub[/code]&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description><pubDate>Thu, 20 Jan 2011 12:36:21 GMT</pubDate><dc:creator>Dustin Taylor</dc:creator></item><item><title>RE: AllowMultipleModifiedRecords problem</title><link>http://forum.strataframe.net/FindPost29399.aspx</link><description>Has this post been overlooked?&amp;nbsp; Perhaps I have not explained the problem sufficiently?&lt;br/&gt;&lt;br/&gt;Sam Tenney</description><pubDate>Thu, 20 Jan 2011 09:23:26 GMT</pubDate><dc:creator>Sam Tenney</dc:creator></item></channel></rss>