How do you create SQL Server 2005 stored procedure templates in SQL Server 2005 Management Studio?
views:
16587answers:
4
+5
Q:
How do you create SQL Server 2005 stored procedure templates in SQL Server 2005 Management Studio?
+3
A:
You bring up Template Explorer using Ctrl+Alt+T or trough View > Template Explorer. Then you can right click tree nodes to add new Templates or new folders to organize your new templates.
smink
2008-09-15 17:37:44
great use of screen captures. Very good comment!
JD Long
2009-01-22 15:27:04
is there a way to make that template a default for sproc template?
roman m
2009-02-27 00:12:30
A:
its nice article but how can i link this template while creating new procedure ?
the default templates are in C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlworkbenchprojectitems\Sql\Stored Procedure be careful changing them and at least back them up if you modify them.
Chris Woodruff
2009-01-22 16:03:54
A:
Little note on your example template
Instead of using IF @@TRANCOUNT > 0 ROLLBACK
We use IF (XACT_STATE()) <> 0 ROLLBACK TRANSACTION; as it seems to provide a better grasp of the state of the transaction
BigEoino
2010-04-02 10:20:52
Very cool idea and actually my solution may be getting smelly since it was created a number of years ago. May have to revise it. Thanks for the feedback.
Chris Woodruff
2010-04-14 21:50:43