Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error on NO CDX
Message
 
 
To
18/11/2001 14:02:06
Joel Hokanson
Services Integration Group
Bellaire, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00583250
Message ID:
00583255
Views:
51
>I want to be able to rebuild the CDX when it does not exist.
>
>I know I can open the file and delete TAG, but how do I open the file if the CDX is NOT there. It always gives me an error and it confuses my users.
>
>I want to be able to open the file (with no cdx present) and build the CDX.
>
>HOW DO I STOP THAT ERROR MESSAGE???

You can set up local error handler to intercept error 1707. If your table has a primary key see Message #538390.
lcSaveOnError = ON("ERROR")
ON ERROR DO LocalOnError WITH ERROR()
USE test EXCL
ON ERROR &lcSaveOnError
...
RETURN 
*-----------------------------------------

Procedur LocalOnError
Lparameters tnError
IF tnError = 1707
	* CDX is missing
	RETRY
ELSE
	* Something else is wrong
	* Invoke regular error handler
ENDIF	
RETURN
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform