Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Only errors when using my error handling
Message
 
 
To
17/03/1998 16:29:50
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00084856
Message ID:
00085439
Views:
40
>>>>> How do you delete a tag from a table if the CDX is missing?
>>>
>>>Marcus,
>>>
>>>If there is no cdx there is no tag to delete.
>>
>>Thanks for your help. Is there a way to unassociate a table with its CDX file? It looks to me that I should just handle error 1707 when the CDX has been deleted. Thanks again.
>>Marcus.
>Robin here -- I don't reccommend doing this, but the direct answer on disassociating a CDX is a two step process: remove ( i.e. set to 0 ) the low order bit in byte 28 of the DBF header ( assuming free table ) and erase the CDX file itself. Again, I don't recommend doing this, but that is how VFP keeps track of the presence / absence of integral CDX's. Error 1707 simply tells you that the integral CDX ( low order bit of byte 28 of the DBF header is a 1 ) but that the CDX file is missing. In the development environment, I just reply 'Ignore' to the VFP message 'Missing CDX', and voila, VFP turns off the low order bit of byte 28 of the DBF header and I don't see the message again.

Thanks Robin. I think I'll take your advice and not try to mess with the low order bit in byte 28 of the DBF header. Just the sound of that makes my stomach turn. The odd thing to me is that VFP default error routine does not generate an error. In fact it just opens the table without the CDX file, but when I give the ON ERROR it suddenly won't open the table and comes up with the error Structual CDX not found. I've found that I can just capture the error and issue a RETRY. On the second attempt to use a table with a deleted CDX it works fine. I'm sure it probably set the order bit in byte 28 to 0 after the first attempt! Thanks again.
Marcus.
Previous
Reply
Map
View

Click here to load this message in the networking platform