views:

39

answers:

1

Is there a way to have Visual Studio 2010 save the SQL you've developed in the SQL Editor to the current solution?

A: 

If you create a query via the "Server Explorer" you wont be able to save it. You have to copy the SQL to a file and save it.

You can add a sql file to any project though - there is no out of the box template for them though. So either create a template yourself, or just add a text file and change the extension to .sql - you get syntax highlighting etc but you don't get the 'visual' designer, you'll have to paste your code into a sever explorer, new query :-(

To me there seem to be quite a few issues with what they've tried to do with DBs and Visual Studio 2010. The Database Project is way way over the top for most SQL work.

Adrian