Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   System.Data.OleDb.OleDbConnection.ValidateTransaction(OleDbTransaction transaction, String method) +34
   System.Data.OleDb.OleDbCommand.ValidateConnectionAndTransaction(String method) +51
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +68
   System.Data.OleDb.OleDbCommand.ExecuteScalar() +139
   dal_DataAccess.ExecuteScalar(String StoredProcedureName) +52
   bll_Pattern.GetHtmlByID(Int32 ID) +113
   icl_Template.GetListHtml(Int32 TypeID, Int32 PatternID, DataRow Dr, NameValueCollection nv_Prop, Int32 Index, Int32 Count, DataTable dt_Field, dal_DataAccess dal) +87
   Gallery.Page_Load(Object sender, EventArgs e) +8274
   System.Web.UI.Control.OnLoad(EventArgs e) +105
   System.Web.UI.Control.LoadRecursive() +67
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3784


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