I'm affraid I'm not sure what that means. This is my first Stored Proceedure.
Thanks
Main Topics
Browse All TopicsI'm trying to add a TRY/CATCH ROUTINE TO SQL Server 2005 Stored Procedure with no luck. I have now gone back to the very basics, and copied code right from MSDN's examples.
The code below produces the following error -
Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near 'TRY'.
Msg 156, Level 15, State 1, Line 10
Incorrect syntax near the keyword 'END'.
Msg 195, Level 15, State 10, Line 13
'ERROR_NUMBER' is not a recognized function name.
Any ideas? I've tried a couple of MSDN samples, but they all produce syntax errors.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
SQL Server 2000(80)
(So it's 2000 and not 2005 that I'm testing this on). Once I get to the real world application, I will be updateing a linked 2005 server from 2000. The update code works fine. Just going to put it in a TRY/CATCH)
The update code that I want to put in a TRY/CATCH is attached below
Thanks
Business Accounts
Answer for Membership
by: chapmandewPosted on 2009-07-21 at 07:20:02ID: 24904794
are you sure your db compatability mode is set to 90 and not 80?