﻿<?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?)  » FillDataTable returning no records cause an error</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Thu, 02 Jul 2026 01:42:26 GMT</lastBuildDate><ttl>20</ttl><item><title>FillDataTable returning no records cause an error</title><link>http://forum.strataframe.net/FindPost29518.aspx</link><description>I have changed a section of my code recently where I have a this.FillDataTable(loCommand);&amp;nbsp; Now , in some scenarios, this returns no records.&amp;nbsp; This has now caused an error saying currentRowIndex is out of range. I traced this to the get method in the Business Object column.&lt;br/&gt;&lt;br/&gt;Why I am I geting this error and what do I need to do to avoid it. I realise it is something to do with zero records being returned </description><pubDate>Wed, 09 Feb 2011 00:40:50 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: FillDataTable returning no records cause an error</title><link>http://forum.strataframe.net/FindPost29523.aspx</link><description>Thanks Eddie for the confirmation. &lt;br/&gt;&lt;br/&gt;I originally had wriiten the Data Extraction bits months ago and recently changed my searching mecahanism so that no records could be returned. I had forgotten completely about the Navigated Event and was not looking there initially.</description><pubDate>Wed, 09 Feb 2011 00:40:50 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: FillDataTable returning no records cause an error</title><link>http://forum.strataframe.net/FindPost29522.aspx</link><description>Hi Gerarld,&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Yeap, you are right, whenever you use any of the BO properties if there is no record, then it will error out, you should always check for BO.Count &amp;gt;0 to be on the safe side.</description><pubDate>Tue, 08 Feb 2011 19:39:14 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: FillDataTable returning no records cause an error</title><link>http://forum.strataframe.net/FindPost29521.aspx</link><description>OK&amp;nbsp; Got this sorted.&lt;br/&gt;&lt;br/&gt;I have code in the Navigated Event of the business object which uses one of the properties to fill a child table. I coded around this with an if MyBo.Count &amp;gt; 0 and it seems to have sorted it</description><pubDate>Tue, 08 Feb 2011 09:44:45 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: FillDataTable returning no records cause an error</title><link>http://forum.strataframe.net/FindPost29519.aspx</link><description>I set up a brand new project with the same Business Object and issued the same command&amp;nbsp; (this.FilldataTable(locCommand) , which returns no records, but in this project, it behaves as expected, and even though no records are returned, no error message is given.&lt;br/&gt;&lt;br/&gt;So there maybe is&amp;nbsp; a property of the BO, or something else on the form is casuing the error ????</description><pubDate>Tue, 08 Feb 2011 08:23:50 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item></channel></rss>