Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Failed to enable constraints
Message
De
11/03/2011 12:37:12
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Failed to enable constraints
Divers
Thread ID:
01503360
Message ID:
01503360
Vues:
101
Hi,

I changed the structure of a table in my SQL Server database and created a new stored procedure (which was a copy/paste/modify of an existing and working SP). This SP gets called to fill a dataset, but I get this error:

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 411: {
Line 412: // Using GetDataSet will replace the DataSet
Line 413: this.FillDataSet(this.GetCurrentDataSet(),
Line 414: "PlansSelectByBasePlan");
Line 415:

PlansSelectByBasePlan is my SP, defined like this:
CREATE PROCEDURE [dbo].[PlansSelectByBasePlan]

AS
	SET NOCOUNT ON;
	SELECT [Code],
		[CommissionAccount],
		[CommissionFK],
		[CurrencyFK],
		[Description],
		[EffectiveDate],
		[IsARider],
		[IsAWaiver],
		[MaxAge],
		[MaxPremium],
		[MaxSumAssured],
		[MaxUnits],
		[MinAge],
		[MinPremium],
		[MinSumAssured],
		[MinUnits],
		[PlanAccount],
		[PlanPK],
		[PlanTypeFK],
		[UnitsInForce]
	FROM [dbo].[Plans]
	WHERE 
		([IsABasePlan] = 1)
If I run the SP in SSMS it runs and returns the expected data. Any ideas what this problem is?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform