Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sha_agrawal
Starting Member
24 Posts |
Posted - 2008-12-29 : 11:33:21
|
| I am using VB6 and SQL Server 2000.I have created a delete trigger. Which checks for :-IF customer's transaction already exist, can't delete his name from Master.How to show error using Trigger. it works but not able to show the message for user using VB6. Similar problem with defining Constraint/primary key, whenever any such confict occurs my VB based sotware shows the error message generated by the SQL SERVER and shuts off. How to customise errors in SQL SERVER 2000. Please help me. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
revdnrdy
Posting Yak Master
220 Posts |
Posted - 2008-12-29 : 11:55:13
|
| Not exactly sure what your asking (specs unclear to me).Is it possible you could take advantage of raiserror? These are custom error messages that you define.[url]http://msdn.microsoft.com/en-us/library/aa238452(SQL.80).aspx[/url]You could also code in a return value that VB could use to trap errorsSQl returns a 0 when no errors are detected.IF (some_error_value > 0)return 1 to caller (VB script)I am not sure if @@error will help you but you can also look at that.r&r |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-29 : 11:55:59
|
| http://www.sommarskog.se/error-handling-I.html |
 |
|
|
|
|
|