Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Failed to enable constraints
Message
From
22/03/2011 08:33:35
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01503360
Message ID:
01504485
Views:
46
>>Thanks, I thought this sounded like a familiar problem!
>>
>>>Check your older thread on this topic Failed to enable constraints Thread #1495470 Message #1495470
>>>May be it will help.
>>>
>>>>To be honest, I don't know and don't know where to look or how to check. All the data set stuff is hidden by the Mere Mortals framework, I just tell it what stored procedure to run and it creates the dataset.
>>>>
>>>>>Does your DataSet has properly defined Primary Key?
>>>>>
>>>>>Also, I believe we discussed this exact error about a month or so ago with you before.
>>>>>
>Frank,
>Were you able to figure this out? Usually, I run into this when building a dataset for a report where there might be duplicate keys and I don't really care. I generally either add another column based on the ROW_NUMBER from SQL or create a new dataset and use the following code:
>
>            DataSet ds = new DataSet();
>            ds.EnforceConstraints = false;
>            this.FillDataSet(.....);
>            this.SetCurrentDataSet(ds);
>
>I have only used the latter option when creating a dataset for reporting, which I do in a generic business object.
>Linda

Hi Linda,

yes, Naomi pointed out that I had asked the same question some months ago and had got an answer there that uses code very similar to the code you have provided here. SO my problem is sorted and hopefully I'll remember it when next I come across it :)
Frank.

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

Click here to load this message in the networking platform