﻿<?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?)  » Business Object - Requery method</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 01:51:09 GMT</lastBuildDate><ttl>20</ttl><item><title>Business Object - Requery method</title><link>http://forum.strataframe.net/FindPost17539.aspx</link><description>I really thought there was a requery method that would just re-run the last query used to populate a business object, but for the life of me I can't find it.&lt;/P&gt;&lt;P&gt;Here's what I'm trying to do:&amp;nbsp; I have a business object tied to a DevExpress grid using a BBS, the user may run a function that will&amp;nbsp;archive 1, 5, 17, ?? rows from the linked table to some archive table on the backend using a stored procedure, and I need to refresh the BO and thus the grid to reflect the changes.&amp;nbsp; However, since the user may of called one of several different FillBy's or ran some custom lookup I would have to do a lot of work in my form tracking the last SQL (and applied filters).&amp;nbsp; It seems to me the BO should be able to just store off the last ran SQL, and then just re-run it.&lt;/P&gt;&lt;P&gt;TiA&lt;/P&gt;&lt;P&gt;Jason Seidell</description><pubDate>Thu, 10 Jul 2008 10:38:39 GMT</pubDate><dc:creator>Jason Seidell</dc:creator></item><item><title>RE: Business Object - Requery method</title><link>http://forum.strataframe.net/FindPost17762.aspx</link><description>The idea about creating a baseBo sounds good to me, that's what I will follow and I'll see how this works out.&lt;/P&gt;&lt;P&gt;Thanks to all for the great input!!&amp;nbsp; :)</description><pubDate>Thu, 10 Jul 2008 10:38:39 GMT</pubDate><dc:creator>Jason Seidell</dc:creator></item><item><title>RE: Business Object - Requery method</title><link>http://forum.strataframe.net/FindPost17761.aspx</link><description>I have a work table of items that need processed, which the user might run a various fillby or lookup to pull back only a subset of records, and then a batch command maybe ran that would process and thus remove a number of those records.&amp;nbsp; However those sub-commands are using stored procedures and thus no updating to the business object.&amp;nbsp; Once the batch command completes the grid/BOs still show records that no longer exist on the database because the records were pulled out from underneath the BO on the database.&amp;nbsp; So I want an easy way to refresh&amp;nbsp;the dataset without resorting to trying to track the last ran FillBy and the parameters used.</description><pubDate>Thu, 10 Jul 2008 10:36:27 GMT</pubDate><dc:creator>Jason Seidell</dc:creator></item><item><title>RE: Business Object - Requery method</title><link>http://forum.strataframe.net/FindPost17754.aspx</link><description>I guess I don't understand the benefit or use of what you are trying to explain here.&amp;nbsp; Not that it may not be a valid enhancement request.&amp;nbsp; But there is not a method that just executes a Requery on a BO at the moment.&amp;nbsp; We have this functionality with our ListViews, Lists, and Combo controls.&amp;nbsp; But I have, to date, not run into a scenario or a need where the BO is caching queries for re-execution.&amp;nbsp; &lt;/P&gt;&lt;P&gt;If you have this need, you could implement it yourself very easily within your BaseBO (if you have one).&amp;nbsp; You can just override the query methods of the BO, for example the FillDataTable, and then cache this off yourself.&amp;nbsp; If you have a BaseBO setup, then you could implement this in an hour or less.&amp;nbsp; ANd if you don't currently have a BaseBO, this might be a good time to create one and then inherit your BOs from your BaseBO that has this caching logic.</description><pubDate>Thu, 10 Jul 2008 09:55:36 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Business Object - Requery method</title><link>http://forum.strataframe.net/FindPost17751.aspx</link><description>Yeah but my point is why couldn't the BO just capture the last SQL statement used to fill it, and then the requery would just re-run the last SQL statement???&amp;nbsp; Bypassing/ignoring whether the SQL statement came from a Fill method or a FillDataTable, and not having to store the where parameters.</description><pubDate>Thu, 10 Jul 2008 09:47:08 GMT</pubDate><dc:creator>Jason Seidell</dc:creator></item><item><title>RE: Business Object - Requery method</title><link>http://forum.strataframe.net/FindPost17568.aspx</link><description>Hi Jason,&lt;/P&gt;&lt;P&gt;Assuming the archived&amp;nbsp;data is removed from the data view the grid is bound to you could just execute the grids RefreshDataSource method.&lt;/P&gt;&lt;P&gt;Like Greg we also have a Refresh button on all forms so data can be reloaded using changed data selection criteria and to pick up changes made by other users.&lt;/P&gt;&lt;P&gt;Cheers, Peter</description><pubDate>Wed, 02 Jul 2008 19:04:50 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: Business Object - Requery method</title><link>http://forum.strataframe.net/FindPost17543.aspx</link><description>The framework doesn't provide this functionality...and for the very reasons you mentioned.  There's just no way the framework can know enough about how you filled a BO to have any idea how to refill it automatically, because it provides so many ways to fill a BO.  So, you're best bet is to track how they filled the BO and then you could just recall that code. On many of my forms I have a refresh button that just calls the appropriate fill code again. Sometimes I also attempt to reselect the row they were viewing (this isn't in a grid though). The code tends to be in form's as that is were I actually know how to refresh the BO.</description><pubDate>Wed, 02 Jul 2008 13:19:57 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>