Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business Object Generator
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01444100
Message ID:
01445096
Vues:
50
Bob,
You may want to just generate a unique key for your view. I think that might get you past this error. I have gotten that a few times when using views with business objects and that seemed to solve the problem.
The other option is to create a new dataset, turn the constraints off on that and set the biz object's current dataset to the new dataset. Sample code is below.
            DataSet ds = new DataSet();
            ds.EnforceConstraints = false;
            this.FillDataSet(ds, StoredProcedureName, TableName,
                param1, param2, param3);
            this.SetCurrentDataSet(ds);
            return ds;
Linda

>Well,
>
>In my case, the DataTable is a view. I'll look further into how the column attributes are generated by the view definition.
>
>Thanks for your help.
>
>Bob
>
>
>>Bob,
>>
>>>System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
>>
>>I recommend going through each column of your DataTable carefully. You can get this error if you are returning data that is longer than specified in the max length of a data column, or if you have a column marked as a PK and it shouldn't be,
>>
>>Best Regards,
Linda Harmes
HiBit Technologies, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform