Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine constraints?
Message
From
03/11/2015 06:39:48
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
How to determine constraints?
Environment versions
Environment:
C# 4.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01626946
Message ID:
01626946
Views:
59
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)
        {
            //check
            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?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Next
Reply
Map
View

Click here to load this message in the networking platform