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

Click here to load this message in the networking platform