StrataFrame Forum

CurrentRowIndex is out of range

http://forum.strataframe.net/Topic22770.aspx

By jctscorpio - 4/17/2009

Exception:

The CurrentRow for table '[dbo].[Query]' could not be evaluated because the CurrentRowIndex is out of range.  Business object record count: 0.  CurrentRowIndex: -1.

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.

public void FillBySubjectPage(string subjectId, int pageId) // in my BO partial class

{

FillDataTable("SELECT * FROM Query WHERE PatientId = " + subjectId + " AND PageId = " + PageId.ToString());

}

what can I do to prevent this?

By jctscorpio - 4/18/2009

I fixed my problem. typo mistake BigGrin
By Trent L. Taylor - 4/18/2009

Glad you got it going Smile