Subject | Re: [IBO] I dont want to see the record by postretain |
---|---|
Author | Helen Borrie |
Post date | 2003-12-05T13:01:20Z |
At 12:43 PM 5/12/2003 +0000, you wrote:
committed yet, it can be seen only by the transaction that posted it. So
you could detect duplicates aready committed by using a different transaction.
It is *still* the wrong way to do this because it means client code is
performing data integrity checks. That is what I mean by "bad design".
1. You should perform this check *before* you permit the Insert to
start. Don't let users waste time on entering data that might have to be
cancelled.
2. For application-independent data integrity, you should place a UNIQUE
constraint on that Supplier Invoice column. If you have more than one
supplier, the UNIQUE constraint will need to be a composite of Supplier
Code and Supplier Invoice Number.
Helen
>I didn't use the Invoice number as the primary key. Yes, the invoiceOk...Post actually writes the record to the database. If it is not
>exist before entering it into database. Because this invoices aren't
>company's invoice but they invoices from our purchases. Hope you
>understand my english. I be glad if you find my design very wrong.
>
>My question is there a way when searching for a duplicate record that
>that it will not see the postretain done by IBO?
committed yet, it can be seen only by the transaction that posted it. So
you could detect duplicates aready committed by using a different transaction.
It is *still* the wrong way to do this because it means client code is
performing data integrity checks. That is what I mean by "bad design".
1. You should perform this check *before* you permit the Insert to
start. Don't let users waste time on entering data that might have to be
cancelled.
2. For application-independent data integrity, you should place a UNIQUE
constraint on that Supplier Invoice column. If you have more than one
supplier, the UNIQUE constraint will need to be a composite of Supplier
Code and Supplier Invoice Number.
Helen