﻿<?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  » Bug in FillByParent()</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 17:19:53 GMT</lastBuildDate><ttl>20</ttl><item><title>Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost7250.aspx</link><description>If a business object calls its FillByParent() method&amp;nbsp;and the parent's CurrentView contains no rows, the SQL statement that is built will not be properly formatted and a SQLException will be thrown ("incorrect syntax...").&amp;nbsp; If the parent business object's CurrentDataTable has at least one row, the problem can be worked around by blanking out the&amp;nbsp;RowFilter property of the parent's CurrentView before calling FillByParent() and then reestablishing it after FillByParent() completes.&amp;nbsp; If you have any questions, let me know.&amp;nbsp;</description><pubDate>Mon, 28 Apr 2008 15:20:06 GMT</pubDate><dc:creator>fparker</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost15965.aspx</link><description>[quote][b]Trent L. Taylor (04/28/2008)[/b][hr]But you are ALWAYS better off being pre-emptive when dealing with emtpy tables, BOs, etc.[/quote]&lt;P&gt;Yes, you are right, I have not even noticed that in the same form I was using the BO.count check as you suggested here and was blocked by the error, and even took the time to check the forums before posting.&amp;nbsp; Well I am still getting used to SF :P&amp;nbsp;and so far I love it :hehe:</description><pubDate>Mon, 28 Apr 2008 15:20:06 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost15964.aspx</link><description>From what I can tell the issue is that the parent BO doesn't have any records.&amp;nbsp; In that case, just test it prior to calling the Fill method...which is better anyway.&amp;nbsp; This is &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;already&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; on my list.&amp;nbsp; But you are ALWAYS better off being pre-emptive when dealing with emtpy tables, BOs, etc.</description><pubDate>Mon, 28 Apr 2008 15:14:44 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost15960.aspx</link><description>Hi Trent,&lt;/P&gt;&lt;P&gt;Just to let you know that today I was bit by the same issue, I got the same error.&lt;/P&gt;&lt;P&gt;Obviously using the count test will work in this case, but I think this should be fixed ASAP.</description><pubDate>Mon, 28 Apr 2008 15:02:40 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost12098.aspx</link><description>I have not had a chance to set this up, but it would probably be a good idea to just add a test around the DetailBO1 before calling it.&amp;nbsp; &lt;/P&gt;&lt;P&gt;[codesnippet]If ScheduleBO1.Count &amp;gt; 0 Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DetailsBO1.FillByParent()&lt;BR&gt;End If[/codesnippet]&lt;/P&gt;&lt;P&gt;I will look into this though.</description><pubDate>Fri, 19 Oct 2007 09:28:48 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost12090.aspx</link><description>Just following up to see if I have a problem or if there is a small bug...&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Tim</description><pubDate>Fri, 19 Oct 2007 09:08:57 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost12035.aspx</link><description>Hi Ben,&lt;/P&gt;&lt;P&gt;The exception I'm getting when sch_SheduleBO1 is empty is: 'SQL Exception Unhandled by user code' Line 1: Incorrect Syntax Near ')'.&lt;/P&gt;&lt;P&gt;My Code:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Sch_ScheduleBO1.FillAll()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Sch_ScheduleDetailBO1.FillByParent()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;If I add 1 record to my Sch_Schedule table, everything works fine.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I also attached the DEBUG information for the two fill methods.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Stacktrace:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlDataReader.get_MetaData()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.SqlDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(QueryInformation QueryInfo, OnChangeEventHandler CallBack)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DataLayer.GetDataTable(QueryInformation QueryInfo, Boolean RegisterNotification)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.FillOrGetByParentPrimaryKey(Object[] ParentPrimaryKeys, Boolean ReplaceCurrentDataTable)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.FillOrGetByParent(BusinessLayer Parent, Boolean ReplaceCurrentTable)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.FillByParent()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at Avanti.Scheduling.frmMain.frmMain_Load(Object sender, EventArgs e) in C:\Source Code\Scheduling\Avanti Scheduling\Avanti Scheduling\Forms\frmMain.vb:line 75&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.EventHandler.Invoke(Object sender, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.OnLoad(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.OnCreateControl()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmShowWindow(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ContainerControl.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.WmShowWindow(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)</description><pubDate>Tue, 16 Oct 2007 13:57:50 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost12033.aspx</link><description>Yes, there will be an official release in the coming weeks/month.&amp;nbsp; No official date at the moment, though.</description><pubDate>Tue, 16 Oct 2007 10:15:58 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost12030.aspx</link><description>[quote][b]Ben Chase (10/15/2007)[/b][hr]The latest DLLs have been posted here: &lt;A href="http://forum.strataframe.net/FindPost11975.aspx%20"&gt;http://forum.strataframe.net/FindPost11975.aspx&lt;/A&gt; [/quote] &lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;Can/should we all download those DLLs, or will it be an official release shortly to keep everybody in synch?&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Tue, 16 Oct 2007 10:10:11 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost12019.aspx</link><description>Hrm, yeah, those DLLs have the fix for FillByParent when the parent is empty.&amp;nbsp; So, if you're still getting the error, then yes, it might be unrelated.&amp;nbsp; Could you post the details for the exception that you're receiving?</description><pubDate>Tue, 16 Oct 2007 09:09:39 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost12001.aspx</link><description>Sorry Ben, Just want to clarify. Does the code found in the above link solve this problem or do I have to wait until 1.62.&lt;/P&gt;&lt;P&gt;I downloaded and installed the updates (copied to my GAC), but I still get an error with the FillByParent. I'm just wondering if my problem isn't related to this one.&lt;/P&gt;&lt;P&gt;Tim</description><pubDate>Mon, 15 Oct 2007 13:47:34 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost11999.aspx</link><description>Thanks Ben.&lt;/P&gt;&lt;P&gt;Tim</description><pubDate>Mon, 15 Oct 2007 13:31:48 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost11989.aspx</link><description>The latest DLLs have been posted here: &lt;A href="http://forum.strataframe.net/FindPost11975.aspx"&gt;http://forum.strataframe.net/FindPost11975.aspx&lt;/A&gt;</description><pubDate>Mon, 15 Oct 2007 10:01:43 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost11988.aspx</link><description>Yes, it should be fixed in the current version.&amp;nbsp;&amp;nbsp; It's checking on parent.IsEmpty and either clearing or returning the data table according to whether it is a Get or a Fill.&amp;nbsp; Should be in 6.2.</description><pubDate>Mon, 15 Oct 2007 10:00:34 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost11967.aspx</link><description>Did this problem get resolved in the latest release?&amp;nbsp; I'm getting an error using FillByParent when the Parent business object is empty.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Tim</description><pubDate>Sun, 14 Oct 2007 15:46:29 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Bug in FillByParent()</title><link>http://forum.strataframe.net/FindPost7255.aspx</link><description>Yes, if there are no rows in the parent business object then a FillByParent() should just clear the child business object (since there are no rows to match the parent).&amp;nbsp; Thanks for the info... I'll make sure that gets fixed.</description><pubDate>Thu, 01 Mar 2007 17:02:40 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>