` Printed Icetips Article

Icetips Article



Par2: Alternate way to avoid "No records" message
2002-09-18 -- Richard Rose
 
I've just found an example of data corruption that might be affecting others
with out their knowledge.

Using an ABC process I had upto now just simply been RETURNing before the
parentcall of the TakeNoRecords embed in a Process template sometimes with a
message() before the RETURN. Don't. Use
ThisWindow.Init 5101
GlobalErrors.SetFatality(Msg:NoRecords,LEVEL:Benign)

and
 ThisWindow.Kill 5001
GlobalErrors.SetFatality(Msg:NoRecords,LEVEL:Notify)

and you will not get any data corruption from this problem.

In this example this is what I was doing

Changing a record from AAAA to BAAA (the primary ID field is not being
changed, each capital letter represents a different field in the record)
In the Take Completed of the update Form I called a process and passed AAAA
and BAAA as a group to that process.
Process filtered an Alias file for records that matched AAAA
Any found where changed to BAAA and this caused no problems.

If No records were found then it Message()'ed and then Return'ed before the
parent call.
If the No Records situ arose then records that matched BAAA (ie existed
before AAAA became BAAA) were trashed except for the record I had just
changed.

Now I suspect this is more a filemanager problem than a process problem and
the return in the process is perhaps short cutting something but either way
the BAAA records shouldn't be trashed as there was no code to update or
trash this.

I would been to keen know if I was doing something fundamentally wrong
becuase I can better understand the file manager.



Printed May 4, 2024, 5:10 pm
This article has been viewed/printed 35117 times.