Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SP Builder Utility
Message
De
29/12/2000 18:55:38
 
 
À
29/12/2000 16:13:20
George Simon
GS Data Technologies, LLC
Cincinnati, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00457879
Message ID:
00458005
Vues:
14
>Here's an example of a DELETE SP that checks for a foreign key constraint violation and then any other errors:
>
>-- Determine if a foreign key constraint has been violated.
>IF @nError = 547
> BEGIN
> RAISERROR('This community is already in use and cannot be deleted.',11,1)
> GOTO err_handler
> END


Well, a wizard can't really create custom messages for you, but you are free to add them yourself to the script that the wizard generates (or right in the wizard if you want, if you want the wizard to add the sprocs directly).

>I typically check the @@ERROR function after every SQL statement. If an error occurs, the message can can be retrieved using AERROR() in my data service object (have to do some parsing.)

It can be retreived from the data access object regardless...
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform