Date:  10/25/2006 07:13:30 PM Msg ID:  003179
From:  FoxWeb Support Thread:  003025
Subject:  Re: perplexing intermittent error
I can't think of a reason why this would make a difference, but if it does, then keep it.  By the way, you don't need to create .fwx files, unless you want to include HTML code segments that get returned to the browser.  In all other cases it's cleaner to use PRG files and call them with the DO statement.

FoxWeb Support Team
support@foxweb.com email

Sent by on 10/25/2006 05:51:15 AM:
 Well, I finally have gotten to the bottom of this. It's unrelated to the file opening technique in openDbfs.prg, but is related to how openDbfs.prg is called. I called it as a function:

=openDbfs()

That's unreliable.

I recast openDbfs.prg as openDbfs.fwx and call it thus:

=server.execute("openDbfs.fwx")

Problem gone.

Ciao,

Alden
Sent by James Williams on 07/19/2006 07:26:31 AM:
The only thing i would say is not to open tables that you know that you are not going to use within the script. otherwise looking good!!!
 
Sent by on 07/19/2006 06:29:19 AM:
 James,

openDbfs() now looks like this:

close data all
use .\database\people in 0 alias PEOPLE
use .\database\workOrders in 0 alias WORKORDERS
use .\database\prices in 0 alias PRICES
use .\database\charges in 0 alias CHARGES
use .\database\waiver in 0 alias WAIVER
use .\database\chargesadhoc in 0 alias ADHOC
use .\database\payments in 0 alias PAYMENTS
use .\database\mess in 0 alias MESS
set dele on
retu(.t.)

I just quickly checked to see if it was bug free. It is. The files all opened and did so quickly. I'll report back in a few days. I hope the above fixes the problem.

Thanks.

Alden
Sent by James Williams on 07/19/2006 06:13:38 AM:
I still recommend making sure that the environment is clean. Close all tables and then open (if you are on a shared server). using "Use data\tablename in 0"
Sent by on 07/19/2006 05:18:20 AM:
 Hello,

My openDbf() now looks like this:

close data all
if !used("PEOPLE")
  sele 0
  use .\database\people alias PEOPLE
endif
if !used("WORKORDERS")
  sele 0
  use .\database\workOrders alias WORKORDERS
endif
...

I'm still getting the perplexing intermittent error:

 There was an error during the interpretation of your request.

Error #:              13
Message:         Alias 'WORKORDERS' is not found.
Program:         c:\inetpub\potter\stoutmarinedatabase\mgmt.fxp
Line #:         9
Line:         sele WORKORDERS

If I hit the browser's refresh the error vanishes and all works fine.

Any more ideas?

Ciao,

Alden



Sent by on 07/06/2006 02:04:09 PM:
Hello,

I'm getting a perplexing intermittent error:

 There was an error during the interpretation of your request.

Error #:              13
Message:         Alias 'WORKORDERS' is not found.
Program:         c:\inetpub\potter\stoutmarinedatabase\mgmt.fxp
Line #:         9
Line:         sele WORKORDERS

If I hit the browser's refresh the error vanishes and all works fine.

mgmt.fwx
line 8 =openDBFs()
line 9 sele WORKORDERS

opendDBFS.prg
if !used("PEOPLE")
  sele 1
  use .\database\people alias PEOPLE
endif
if !used("WORKORDERS")
  sele 2
  use .\database\workOrders alias WORKORDERS
endif
retu(.t.)