Server Error in '/' 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 22:             if (!string.IsNullOrEmpty(cur_Id))
Line 23:             {
Line 24:                 drDtl = CSA.DAL.DBAccess.getRS("select * from BS_JobInfo where id=" + int.Parse(cur_Id)).Rows[0];
Line 25:                 code = drDtl["bs_JobCode"].ToString();
Line 26:             }

Source File: e:\wwwroot\anyka\jobdetail.aspx.cs    Line: 24

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +113
   System.Data.DataRowCollection.get_Item(Int32 index) +21
   jobdetail.Page_Load(Object sender, EventArgs e) in e:\wwwroot\anyka\jobdetail.aspx.cs:24
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +46
   System.Web.UI.Control.OnLoad(EventArgs e) +83
   System.Web.UI.Control.LoadRecursive() +120
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3928


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