Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine constraints?
Message
De
03/11/2015 06:39:48
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
How to determine constraints?
Versions des environnements
Environment:
C# 4.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01626946
Message ID:
01626946
Vues:
60
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform