Posted by wayne on Mar 01 2005 in Programming
Getting VS.NET to Recognize @ as T-SQL Variable Prefix
Some of you may be rolling your eyes at this suggestion, but it's been bugging me for months and I finally figured out how to fix it.
For many moons I've been editing T-SQL stored procedures using VS.NET, but been annoyed because every time I when to the graphical query designer it didn't know anything about T-SQL variables (i.e. @MyVar). I could get around this by right-clicking the SQL pane and changing the property page. Very conveniently the designer deleted all your SQL when you do this so I always had to remember to copy my SQL change the property page and paste the SQL back in.
Turns out there is a setting in Tools: Options: Database Tools: Query/View Designer that will take care of it.
This entry was posted by wayne and filed under Programming.