Server Error in '/academics' 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 66:             SQLclient sqlAgent = new SQLclient(sql);
Line 67:             DataSet ds = sqlAgent.getDataSet();
Line 68:             return ds.Tables[0].Rows[0];
Line 69:         }
Line 70: 

Source File: d:\InetPub\ic_subsite\academics\App_Code\academics\BookInfo.cs    Line: 68

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2430497
   System.Data.DataRowCollection.get_Item(Int32 index) +19
   academics.BookInfo.get_book(String bookLang, String bookid) in d:\InetPub\ic_subsite\academics\App_Code\academics\BookInfo.cs:68
   webpages_2017_bookList.printBookDeatil(String bookid) in d:\InetPub\ic_subsite\academics\webpages\2017\bookList.aspx.cs:616
   webpages_2017_bookList.Page_Load(Object sender, EventArgs e) in d:\InetPub\ic_subsite\academics\webpages\2017\bookList.aspx.cs:65
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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