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.