Kbase P152967: Record not available to methods in different class levels when found within the hierarchy of the cla
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/4/2010 |
|
Status: Unverified
SYMPTOM(s):
Record not available to methods in different class levels when found within the hierarchy of the class
** No <file-name> record is available. (91)
Buffer scope in class hierarchy is different than in procedural code
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.1x
OpenEdge 10.2x
CAUSE:
When a FIND or FOR EACH is performed on a temp-table or database table's default buffer an implicit buffer is created and scoped to the procedure or block in which it was created. In ABL classes, by default, an implicit buffer that is found in a method is scoped to that class instance/level (.cls file).
e.g.
Class B inherits class A. In a method of class A a FIND is performed on a table then a method is called in class B to display the buffer. This DISPLAY fails...
This is expected behavior.
FIX:
To make a buffer available to all levels of the class hierarchy you must define a PROTECTED buffer with some name besides the default table name. This is because, at compile time, the compiler will look at local resources like connected databases prior to looking up the class hierarchy and finds the database table first.