Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Failed to enable constraints
Message
From
11/01/2011 13:47:55
 
 
To
11/01/2011 12:22:34
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01495470
Message ID:
01495730
Views:
54
This message has been marked as the solution to the initial question of the thread.
Try changing
public DataSet GetReceiptByPKForPrint(Guid receiptPK)
        {
            return this.GetDataSet("ReceiptsSelectByPKForPrint",
                this.CreateParameter("@ReceiptPK", receiptPK));
        }
to
public DataSet GetReceiptByPKForPrint(Guid receiptPK)
        {
            DataSet ds = new DataSet();
            ds.EnforceConstraints = false;
            
            this.FillDataSet(ds, "ReceiptsSelectByPKForPrint", CommandType.StoredProcedure, this.CreateParameter("@ReceiptPK", receiptPK));

            this.DataSet = ds;

            return this.DataSet;
        }
I believe GetDataSet creates a new dataset on retrieval, which causes you to lose the setting of EnforceConstraints. FillDataSet uses an existing dataset, so the setting is preserved.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform