dbTalk Databases Forums  

FoxPro/DOS 2.6 error if no .CDX file

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


Discuss FoxPro/DOS 2.6 error if no .CDX file in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John R. Sowden
 
Posts: n/a

Default FoxPro/DOS 2.6 error if no .CDX file - 07-23-2010 , 08:04 PM






In the event that the .CDX file does not exist, opening the .DBF
_usually_ causes an error-enough to stop the program. I have been
looking for a way to keep this from happening, such as an argument in
the 'use' command that instructs foxpro to ignore the missing .CDX
file.

Of course I can, and do, test for the existence of the appropriate
files, but I want to recover in the process, not get a call that the
program does not work.

Thanks,

John

P.S. I rtfm!

Reply With Quote
  #2  
Old   
Stefan Wuebbe
 
Posts: n/a

Default Re: FoxPro/DOS 2.6 error if no .CDX file - 07-24-2010 , 03:04 PM






On 24.07.2010 03:04, John R. Sowden wrote:
Quote:
In the event that the .CDX file does not exist, opening the .DBF
_usually_ causes an error-enough to stop the program. I have been
looking for a way to keep this from happening, such as an argument in
the 'use' command that instructs foxpro to ignore the missing .CDX
file.

Of course I can, and do, test for the existence of the appropriate
files, but I want to recover in the process, not get a call that the
program does not work.

Thanks,

John

P.S. I rtfm!

Hi John,

IIRC, something like this used to work in Fox 2.x:

lcError = On('Error')
ON ERROR *
USE theTable ALIAS theAlias && IN 0 SHARED AGAIN
ON ERROR &lcError
llSuccess = USED('theAlias')



hth
-Stefan

Reply With Quote
  #3  
Old   
Michael J Davis
 
Posts: n/a

Default Re: FoxPro/DOS 2.6 error if no .CDX file - 07-29-2010 , 07:09 AM



John R. Sowden <jsowden (AT) americansentry (DOT) net> was inspired to say
Quote:
In the event that the .CDX file does not exist, opening the .DBF
_usually_ causes an error-enough to stop the program. I have been
looking for a way to keep this from happening, such as an argument in
the 'use' command that instructs foxpro to ignore the missing .CDX
file.

Of course I can, and do, test for the existence of the appropriate
files, but I want to recover in the process, not get a call that the
program does not work.
When I've had similar problems[1] I've added a routine that deletes the
CDX and rebuilds the index. That's worked for me.

[1] Such as a member of staff deciding that the data is there
and they'd look at it using Excel!

Mike

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.