Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Failed to enable constraints
Message
From
11/01/2011 14:36:51
 
 
To
11/01/2011 13:47:55
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01495470
Message ID:
01495736
Views:
45
Thanks, that seems to work.

>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.
Frank.

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

Click here to load this message in the networking platform