Server Error in '/directory' Application.

There is no row at position 0.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IndexOutOfRangeException: There is no row at position 0.

Source Error:


Line 364:            <caption>faculty or staff member details table</caption>
Line 365:          <tbody>
Line 366:            <% If Not (dsFacultyDetail.theDS.Tables(0).Rows(0)("Picture") IS DbNull.Value ) Then %>
Line 367:            <tr>
Line 368:              <th colspan="2" valign="top"><img name="FacStaffPic" src="https://www.qcc.cuny.edu<%# dsFacultyDetail.FieldValue("Picture", Container) %>" alt=""></th>

Source File: E:\Sites\Production\www2\directory\FacultyDetail.aspx    Line: 366

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +125
   System.Data.DataRowCollection.get_Item(Int32 index) +19
   ASP.facultydetail_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in E:\Sites\Production\www2\directory\FacultyDetail.aspx:366
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8680


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4063.0