Hi,
I have a XAML/C# .NET application done using VS 2010 and MM.NET.
When I run a query to pull out a list of matching AirWay Bills (AWB) I get a notice back: "Failed to enable constraints"
This occurs when modifying an existing record and only when a particular AWB is in the resultant list. If I add a nw record, when the same query gets run I do not get this error message.
To explain more fully, an Invoice must be assigned to an AWB so I have a combo box on my invoice form and this code:
protected void autoAWBs_PatternChanged(object sender, Gui.Controls.AutoComplete.AutoCompleteArgs args)
{
if (string.IsNullOrEmpty(args.Pattern))
args.CancelBinding = true;
else
{
args.DataSource = this.AWBLookup.GetAirWayBillsLikeAirWayBillNumber(args.Pattern);
}
}
This is the code that runs the Stored Procedure to pull out the matching AWBs:
public mmBindingList<AirWayBillEntity> GetAirWayBillsLikeAirWayBillNumber(string airWayBillNumber)
{
return this.GetEntityList("AirWayBillsSelectLikeAWBNumber", this.CreateParameter("@awb_number", airWayBillNumber));
}
Even if I enter the full AWB # so there is only one possible match I get this error:
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
The result set has only one record, with no null values anywhere and no foreign key constraints (as far as I can tell).
So I am completely stumped.
Anyone have any ideas on how to troubleshoot this?