﻿<?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 » WinForms (How do I?)  » I do not understand why I am getting this error</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 09:34:31 GMT</lastBuildDate><ttl>20</ttl><item><title>I do not understand why I am getting this error</title><link>http://forum.strataframe.net/FindPost21725.aspx</link><description>Hi All.&lt;/P&gt;&lt;P&gt;The BO that is causing this error&amp;nbsp;is for an allocation table that I am manipulating in code. All I did was drop it on the form - I did not bind it to any controls. Now I can no longer bring the form up because of this error. Any ideas?&lt;/P&gt;&lt;P&gt;BusinessLayerException&lt;BR&gt;&amp;nbsp; The CurrentRow for table '[dbo].[planparticipant]' could not be evaluated because the CurrentRowIndex is out of range.&amp;nbsp; Business object record count: 0.&amp;nbsp; CurrentRowIndex: -1.&lt;/P&gt;&lt;P&gt;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : MicroFour StrataFrame Business&lt;/P&gt;&lt;P&gt;Stack Trace: &lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.get_CurrentRow()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at Trinity.BusinessObjects.boPlanParticipant.get_plan_fk() in F:\Trinity_new\Trinity\BusinessObjects\boPlanParticipant.Designer.cs:line 320&lt;BR&gt;&amp;nbsp;&amp;nbsp; at Trinity.Forms.Participants.boParticipants_Navigated(NavigatedEventArgs e) in F:\Trinity_new\Trinity\Forms\Participants.cs:line 83&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.NavigatedEventHandler.Invoke(NavigatedEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.raise_Navigated(NavigatedEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.OnNavigated(NavigatedEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.ForceNavigatedAndBoundRefresh(Boolean dataTableRefilled)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.OnCurrentDataTableRefilled()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable, Boolean AcceptChanges, Boolean IsSharedTable)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable, Boolean AcceptChanges)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(DbCommand CommandToExecute)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at Trinity.BusinessObjects.boParticipants.GetParticipant(Int32 tnParticpant_pk) in F:\Trinity_new\Trinity\BusinessObjects\boParticipants.cs:line 63&lt;BR&gt;&amp;nbsp;&amp;nbsp; at Trinity.Forms.Participants.GetCurrentParticipant(Int32 tnParticipant_pk, Boolean tlPutInEditMode) in F:\Trinity_new\Trinity\Forms\Participants.cs:line 48&lt;BR&gt;&amp;nbsp;&amp;nbsp; at Trinity.Forms.Plans.EditParticipant(Boolean tlPutInEditMode) in F:\Trinity_new\Trinity\Forms\Plans.cs:line 252&lt;BR&gt;&amp;nbsp;&amp;nbsp; at Trinity.Forms.Plans.grdParticipants_DoubleClick(Object sender, EventArgs e) in F:\Trinity_new\Trinity\Forms\Plans.cs:line 302&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.OnDoubleClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.DataGridView.OnDoubleClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)&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.DataGridView.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>Thu, 29 Jan 2009 15:41:51 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: I do not understand why I am getting this error</title><link>http://forum.strataframe.net/FindPost21732.aspx</link><description>You're welcome.</description><pubDate>Thu, 29 Jan 2009 15:41:51 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: I do not understand why I am getting this error</title><link>http://forum.strataframe.net/FindPost21731.aspx</link><description>[quote][b]Edhy Rijo (01/29/2009)[/b][hr]Hi Marcia,&lt;P&gt;You should test for BO.Count &amp;gt; 0 before using any of its properties.&lt;/P&gt;&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #dddd33"&gt;Trinity.BusinessObjects.boPlanParticipant.get_plan_fk() -&amp;gt;&lt;/FONT&gt; this is the code failing, enclose&amp;nbsp;it in the above test and you should be fine.[/quote]&lt;P&gt;I got it fixed - thanks for trying to help. And yes, the problem was that my code was trying to access one of the BO's properties and I stupidly missed it :blush:</description><pubDate>Thu, 29 Jan 2009 15:28:46 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: I do not understand why I am getting this error</title><link>http://forum.strataframe.net/FindPost21729.aspx</link><description>[quote][b]Edhy Rijo (01/29/2009)[/b][hr]Hi Marcia,&lt;P&gt;You should test for BO.Count &amp;gt; 0 before using any of its properties.&lt;/P&gt;&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #dddd33"&gt;Trinity.BusinessObjects.boPlanParticipant.get_plan_fk() -&amp;gt;&lt;/FONT&gt; this is the code failing, enclose&amp;nbsp;it in the above test and you should be fine.[/quote]&lt;P&gt;&amp;nbsp;&lt;P&gt;Actually, to be more precise, this is code that was generated by the business object mapper...</description><pubDate>Thu, 29 Jan 2009 14:56:24 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: I do not understand why I am getting this error</title><link>http://forum.strataframe.net/FindPost21728.aspx</link><description>[quote][b]Edhy Rijo (01/29/2009)[/b][hr]Hi Marcia,&lt;P&gt;You should test for BO.Count &amp;gt; 0 before using any of its properties.&lt;/P&gt;&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #dddd33"&gt;Trinity.BusinessObjects.boPlanParticipant.get_plan_fk() -&amp;gt;&lt;/FONT&gt; this is the code failing, enclose&amp;nbsp;it in the above test and you should be fine.[/quote]&lt;P&gt;This is not my code - it is framework code. I do not have code anywhere that accesses noPlanParticipant - it is just sitting on the form.</description><pubDate>Thu, 29 Jan 2009 14:54:32 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: I do not understand why I am getting this error</title><link>http://forum.strataframe.net/FindPost21726.aspx</link><description>Hi Marcia,&lt;/P&gt;&lt;P&gt;You should test for BO.Count &amp;gt; 0 before using any of its properties.&lt;/P&gt;&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #dddd33"&gt;Trinity.BusinessObjects.boPlanParticipant.get_plan_fk() -&amp;gt;&lt;/FONT&gt; this is the code failing, enclose&amp;nbsp;it in the above test and you should be fine.</description><pubDate>Thu, 29 Jan 2009 14:45:55 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>