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 |
yommy1831
Starting Member
10 Posts |
Posted - 2013-07-11 : 19:40:30
|
Hello,I am TOTALLY new with TSQL/SQL. consider the code below:EXECUTE sp_executesql @sql, N'@xmldataOUT xml OUTPUT', @xmldataOUT=@instance OUTPUT;CREATE XML SCHEMA COLLECTION FASSchema AS @instanceHow can:1. Add a check to the EXECUTE command to see if it fails2. what is a suitable way to display an error message in case the EXECUTE command fails3. Add a check to the CREATE command to see if it failsYour help will be highly appreciated. I need people to jumpstart me |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-07-12 : 00:28:39
|
You can use following methods to handle runtime exceptions...1) TRY...CATCH2) RAISERROR() Check in google for those topicsNOTE: Don not open multiple threads for same issuehttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=186770http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=186769--Chandu |
|
|
yommy1831
Starting Member
10 Posts |
Posted - 2013-07-12 : 07:16:19
|
Thanks Chandu. I am still a little confused after reading the article. |
|
|
|
|
|