Server Error in '/' Application.

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

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.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

Source Error:


Line 4473:            End If
Line 4474:            Dim dataTable As dsRecept.ReceptPerIngredientDataTable = New dsRecept.ReceptPerIngredientDataTable()
Line 4475:            Me.Adapter.Fill(dataTable)
Line 4476:            Return dataTable
Line 4477:        End Function

Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1e8cf914\7f150322\App_Code.1numznil.15.vb    Line: 4475

Stack Trace:


[ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.]
   System.Data.DataTable.EnableConstraints() +475
   System.Data.DataTable.set_EnforceConstraints(Boolean value) +45
   System.Data.DataTable.EndLoadData() +199
   System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +303
   System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +733
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +238
   System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +453
   System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +141
   dsReceptTableAdapters.ReceptPerIngredientTableAdapter.GetAllReceptenByIngredientID(Nullable`1 IngredientID) in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1e8cf914\7f150322\App_Code.1numznil.15.vb:4475

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +128
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +142
   System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +889
   System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1829
   System.Web.UI.WebControls.ObjectDataSource.Select() +89
   WebControls_wucIngredient.FormView1_DataBound(Object sender, EventArgs e) in C:\RootWebstites\TinamicsCMS\ReceptenEnZo\WebControls\wucIngredient.ascx.vb:23
   System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +122
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +134
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +105
   System.Web.UI.Control.EnsureChildControls() +106
   System.Web.UI.Control.PreRenderRecursiveInternal() +66
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6875


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