Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Failed to enable constraints
Message
De
11/01/2011 14:36:51
 
 
À
11/01/2011 13:47:55
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01495470
Message ID:
01495736
Vues:
46
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform