﻿<?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?)  » CurrentRowIndex is out of range</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 11 Sep 2026 17:09:45 GMT</lastBuildDate><ttl>20</ttl><item><title>CurrentRowIndex is out of range</title><link>http://forum.strataframe.net/FindPost22770.aspx</link><description>Exception:&lt;/P&gt;&lt;P&gt;The CurrentRow for table '[dbo].[Query]' 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;It happens when I call my custom Fill method on the BO and there is no record found. The BO designer.cs code try to use the CurrentRow.&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;public&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; FillBySubjectPage(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; subjectId, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; pageId) // in my BO partial class&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;FillDataTable(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"SELECT * FROM Query WHERE PatientId = "&lt;/FONT&gt;&lt;FONT size=2&gt; + subjectId + &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" AND PageId = "&lt;/FONT&gt;&lt;FONT size=2&gt; + PageId.ToString());&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;what can I do to prevent this?&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Sat, 18 Apr 2009 11:33:29 GMT</pubDate><dc:creator>jctscorpio</dc:creator></item><item><title>RE: CurrentRowIndex is out of range</title><link>http://forum.strataframe.net/FindPost22777.aspx</link><description>Glad you got it going :)</description><pubDate>Sat, 18 Apr 2009 11:33:29 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: CurrentRowIndex is out of range</title><link>http://forum.strataframe.net/FindPost22774.aspx</link><description>I fixed my problem. typo mistake :D</description><pubDate>Sat, 18 Apr 2009 09:53:55 GMT</pubDate><dc:creator>jctscorpio</dc:creator></item></channel></rss>