Server Error in '/' Application.

No value given for one or more required parameters.

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.Data.OleDb.OleDbException: No value given for one or more required parameters.

Source Error:


Line 48:         dr.Close();
Line 49:         query = "select Title,ImageName from PhotoGallery where CatId=" + catid + " order by Title";
Line 50:         ds = data.getDataSet(query);
Line 51:         if (ds.Tables[0].Rows.Count > 0)
Line 52:         {

Source File: c:\Websites\sraja.in\Product.aspx.cs    Line: 50

Stack Trace:


[OleDbException (0x80040e10): No value given for one or more required parameters.]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1547633
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +308
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +217
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +219
   System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +138
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +201
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +178
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +122
   Data.getDataSet(String commandString) +111
   Laminated_Wooden_Flooring.fillData() in c:\Websites\sraja.in\Product.aspx.cs:50
   Laminated_Wooden_Flooring.Page_Load(Object sender, EventArgs e) in c:\Websites\sraja.in\Product.aspx.cs:32
   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.3190.0