Server Error in '/' Application.

smallqty

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: smallqty

Source Error:


Line 299:            dr.Read();
Line 300:            String smallqty, mediumqty, largeqty, exlargeqty, qty1, qty2, qty3, qty4, total1, total2, total3, total4, category, usrpwd, prno, field3, field5;
Line 301:            smallqty = dr["smallqty"].ToString();
Line 302:            mediumqty = dr["mediumqty"].ToString();
Line 303:            largeqty = dr["largeqty"].ToString();

Source File: g:\pleskvhosts\webstarpatiala.com\httpdocs\graciousbooks\viewdetails.aspx.cs    Line: 301

Stack Trace:


[IndexOutOfRangeException: smallqty]
   System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) +2158731
   System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) +141
   System.Data.SqlClient.SqlDataReader.get_Item(String name) +21
   Default_demo.obtaingms() in g:\pleskvhosts\webstarpatiala.com\httpdocs\graciousbooks\viewdetails.aspx.cs:301
   Default_demo.Page_Load(Object sender, EventArgs e) in g:\pleskvhosts\webstarpatiala.com\httpdocs\graciousbooks\viewdetails.aspx.cs:183
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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