Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP Builder Utility
Message
From
29/12/2000 18:55:38
 
 
To
29/12/2000 16:13:20
George Simon
GS Data Technologies, LLC
Cincinnati, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00457879
Message ID:
00458005
Views:
13
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform