issues with called table causing lookup behaviour change...need help
Bruce Easton
bruce at stn.com
Fri Aug 9 12:46:28 PDT 2013
On 8/9/13 3:14 PM, Fairlight wrote:
> On Fri, Aug 09, 2013 at 03:03:51PM -0400, Bruce Easton thus spoke:
>> Yes, that's still a problem, Mark. A close in the called table will
>> close for all open lookups on the same file whether they are in the
>> called table or in the main table and regardless of alias. This is
>> consistent with how lookups are handled for the same file just in the
>> main table.
> Instituting a conditional close if it detects it's being called from a
> particular table, then.
>
> *sigh* I cannot even begin to count the ways this breaks the general
> programming tenet of freeing resources as soon as you're done with them.
> Every lookup alias should be treated as an entirely different resource, not
> all tied together like that.
>
> I suspect more people don't get bitten by it because people are notorious
> for not using close in filePro - even when they should/absolutely need to.
>
> Thanks for the confirmation. :)
>
> mark->
It sounds like you just need to change any closes to the common file in
the called table to be write commands. And if it's OK for the values
changed for said file by the called prc to not be written until your
close at the end of your loop in the main program, then you shouldn't
need a write nor a close in the called table.
Bruce
More information about the Filepro-list
mailing list