dbTalk Databases Forums  

VFP 6: Spurious Alias Not Found Errors

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss VFP 6: Spurious Alias Not Found Errors in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gene Wirchenko
 
Posts: n/a

Default VFP 6: Spurious Alias Not Found Errors - 05-11-2006 , 05:18 PM






I have an intermittent problem with a VFP 6 program of mine.
Sometimes, for no reason that I have been able to figure out, it will
throw an alias not found error.

The program is checking that financial figures are correct and
runs through an entire table. The error occurs in a method, and the
table is opened not long before the erroneous statement. There is no
execution path where the table can have been closed before the
error-throwing statement is executed. Still, the error occurs.

If I rerun the program, it works. (Only one time has it failed
twice in a row.) Oddly, the recno() is always just over 50000 though
it is not consistent as to exactly where. I have been unable to
replicate the problem.

The DOS is Windows XP. The table is local.

I have checked and rechecked my code. As far as I can see, there
is no way for the error to occur (assuming no bug in VFP6, no hardware
failure, etc.).

Do you have any ideas about what else I could look at/for?

Sincerely,

Gene Wirchenko


Reply With Quote
  #2  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: VFP 6: Spurious Alias Not Found Errors - 05-11-2006 , 05:44 PM






On Thu, 11 May 2006 15:18:18 -0700, Gene Wirchenko
<genew (AT) ucantrade (DOT) com.NOTHERE> wrote:

Quote:
I have an intermittent problem with a VFP 6 program of mine.
Sometimes, for no reason that I have been able to figure out, it will
throw an alias not found error.

The program is checking that financial figures are correct and
runs through an entire table. The error occurs in a method, and the
table is opened not long before the erroneous statement. There is no
execution path where the table can have been closed before the
error-throwing statement is executed. Still, the error occurs.

If I rerun the program, it works. (Only one time has it failed
twice in a row.) Oddly, the recno() is always just over 50000 though
it is not consistent as to exactly where. I have been unable to
replicate the problem.

The DOS is Windows XP. The table is local.

I have checked and rechecked my code. As far as I can see, there
is no way for the error to occur (assuming no bug in VFP6, no hardware
failure, etc.).

Do you have any ideas about what else I could look at/for?
One additional bit of information that I have just noted. Among
the things that my general error routine dumps to the error log file
is the output of list status. That shows the table as not having an
alias.

I most definitely specify one. (The error message is that the
one that I specified can not be found.) Even if I did not, there
should still be a default one.

Sincerely,

Gene Wirchenko



Reply With Quote
  #3  
Old   
Thomas Ganss
 
Posts: n/a

Default Re: VFP 6: Spurious Alias Not Found Errors - 05-12-2006 , 09:32 AM



Hi Gene,
Quote:
I have an intermittent problem with a VFP 6 program of mine.
Sometimes, for no reason that I have been able to figure out, it will
throw an alias not found error.

The program is checking that financial figures are correct and
runs through an entire table. The error occurs in a method, and the
table is opened not long before the erroneous statement. There is no
execution path where the table can have been closed before the
error-throwing statement is executed. Still, the error occurs.

If I rerun the program, it works. (Only one time has it failed
twice in a row.) Oddly, the recno() is always just over 50000 though
it is not consistent as to exactly where. I have been unable to
replicate the problem.

The DOS is Windows XP. The table is local.

I have checked and rechecked my code. As far as I can see, there
is no way for the error to occur (assuming no bug in VFP6, no hardware
failure, etc.).

Do you have any ideas about what else I could look at/for?


One additional bit of information that I have just noted. Among
the things that my general error routine dumps to the error log file
is the output of list status. That shows the table as not having an
alias.

I most definitely specify one. (The error message is that the
one that I specified can not be found.) Even if I did not, there
should still be a default one.
I encountered such behaviour a coupe of years ago. In my case the table
with the "missing" alias() had just been closed before beeing opened
again. Also, if I was in the debugger, sometimes the watch window
would show part of dbf() as alias(), sometimes even fluctuating.

I had written some code
checking alias() right after use
if not as expected
log
closing the table
try again

which worked flawlessly and the logs sometimes showed that I had
avoided the error. In a later discussion with Aleksey Tsingauz from
MS he explained the error as a threading peciularity of vfp in that
early vfp versions could "drop" the alias name in parallell to opening
the table. His fix for the situation was to have a variable declared
with the alias() as variable name.

In vfp9 I have not found this particular error as being avoided
in my logs, so if you decide to upgrade you might save some time
coding and some runtime every time you open a table <g>.

It is not a big deal in hindsight, but I surely was baffled when
I encounterd the error first time: it was always after at least
8H of full time datamunging. Meant hell for my delivery schedules...

regards

thomas


Reply With Quote
  #4  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: VFP 6: Spurious Alias Not Found Errors - 05-12-2006 , 12:30 PM



On Fri, 12 May 2006 15:32:16 +0100, Thomas Ganss
<tganss_at_t_dash_online_dot_de-remove-all-after-first-real-dash (AT) yahoo (DOT) com>
wrote:

[snip]

Quote:
I encountered such behaviour a coupe of years ago. In my case the table
with the "missing" alias() had just been closed before beeing opened
again. Also, if I was in the debugger, sometimes the watch window
That fits my experience.

Quote:
would show part of dbf() as alias(), sometimes even fluctuating.
I have never been able to replicate the problem reliably, so I
have never played with this in the debugger.

[snip]

It sounds as if we have the same error. Mine always occurs on a
particular statement: the one that closes the table! The table is at
that point the current one though it is specifically referred to by
alias. I suppose I can just use a bare use.

Thank you for the supporting information.

Sincerely,

Gene Wirchenko



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.