Our ERRTRAP routine contains the following code:
-----------
if error() = 1707 or upper(message(1)) = "STRUCTURAL CDX FILE NOT FOUND."
    *-- ignore it, because our programs will build the index.
    retry                     && which will open the file
endif

if error() = 109 or upper(message(1)) = "RECORD IS IN USE"
    *-- Warning message only
    wait window "This record is being edited by another. Try later."
    return
endif
-----------
The first one covers the case where the .CDX file has been deleted.
All our apps, on startup, check for the .CDXes and rebuild them if 
missing.  That allowed us to fix index problems by just deleting the 
.CDX and restart the app.  Doesn't happen much these days.

The second one catches 'waiting for record lock' problems.

Dan Covill

On 07/27/11 02:59, Coppens, Georges, FC (Provincialaat) wrote:
> Using file() to check the existence of a table is not safe.  Have a look
> at:
> http://www.dbmonster.com/Uwe/Forum.aspx/foxpro/4747/Command-to-check-whe
> ther-a-foxpro-table-exists
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Sytze de Boer
> Sent: donderdag 14 juli 2011 23:06
> To: [email protected]
> Subject: Re: No table is open
>
> I think I've found the problem
> The error comes up with error 52, No table is open in the current work
> area
>
> I'm about to test this
> Create a table
> Create a cdx with this table
> Close the table
> Delete the cdx file (I think this has happened at this client site)
>
> now type use thistable
>
>
>
> On Fri, Jul 15, 2011 at 1:18 AM, Alan Bourke
> <[email protected]>wrote:
>
>> I think I had something similar recently but in FoxPro 2.6 - I had
> added
>> an index on a memo field which was all fine until the user ran a
> process
>> which did a PACK MEMO as part of its operations. This caused the CDX
> to
>> become corrupt and on attempting to open the table an "error 1113 -
> File
>> Is Not Open" was thrown, which is sort of in the same ballpark.
>> --
>>   Alan Bourke
>>   alanpbourke (at) fastmail (dot) fm
>>
>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to