Kbase P12495: Cannot find a record created if some fields, which are part
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/12/2002 |
|
Status: Unverified
SYMPTOM(s):
Cannot find a record created if some fields, which are part of an index, are left blank.
When you create a record and some fields are left as blank, it can happen that you cannot find the record within the db when an index is involved.
CAUSE:
Let's say that you're creating a record which have 4 fields and you're just filling three of them. And this record has an index including all of them.
If you do a search like:
find first Wobble where Wobble.CompanyCode = RMColour.CompanyCode
and Wobble.ItemCode = RMColour.ItemCode
and Wobble.ItemColour = RMColour.ItemColour
and Wobble.ItemFitDim = RMColour.ItemFitDim
use-index RMColourS1
no-lock no-error.
where:
- "ItemFitDim" was not added when the record was created
- RMColourS1 index includes all the fields
you will not be able to find the record because the where statement is comparing a "ItemFitDim" value of null with a "ItemFitDim" value of blank.
FIX:
You have to add a initial value for each field included in an index.