Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error on NO CDX
Message
 
 
À
18/11/2001 14:02:06
Joel Hokanson
Services Integration Group
Bellaire, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00583250
Message ID:
00583255
Vues:
54
>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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform