saving ad-hoc sqlserver scripts via Visual Studio

  • Thread starter Thread starter Fred Exley
  • Start date Start date
F

Fred Exley

I come from an Oracle background, where one can, in addition to having
stored procedures in the db, load and run text files containing sql DDL or
DML commands. But I can't seem to find an equivalent in VS2005. I can
create and run an ad-hoc query in the SQL Pane, provided I have already
opened a particular table, but then I don't see how to save that ad-hoc
query as an external script for later use. Is there a way to do this,
rather than making a formal stored procedure? thanks
 
Yes, by creating a database project. It has the ability to help you create
and store SQL scripts.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
 
Bill,

I have not used it (I know it but only have looked slightly to it, it really
seems nice to me for documentation but than I have to start a new (hug)
project), but the question was Run as well. Is that possible from that
database project?

serious question.

Cor
 
Yes, it is. At least, it's possible to run the script to update the
stored procedure. I think you can test the stored procedure using
the Server Explorer in VS2005.

Robin S.
 
Robin,
stored procedure. I think you can test the stored procedure using
the Server Explorer in VS2005.
You had the idea that I did not know that?

:-)

Cor
 
Cor Ligthert said:
Robin,

You had the idea that I did not know that?

:-)

Cor

Sorry, I thought you were asking about the Database Project stuff,
but wasn't completely sure, so I threw in a little extra. Frankly,
I think you know everything, and just post questions like this
to test the rest of us. ;-)

Robin S.
 
Don't encourage him!!!!!!


RobinS said:
Sorry, I thought you were asking about the Database Project stuff,
but wasn't completely sure, so I threw in a little extra. Frankly,
I think you know everything, and just post questions like this
to test the rest of us. ;-)

Robin S.
 
William (Bill) Vaughn said:
Yes, by creating a database project. It has the ability to help you create
and store SQL scripts.

OK thanks, I'll look into it.
 
I can't help but respect people with more knowledge than I,
and the willingness to share it. Like you, bucko.

Robin S.
 
Back
Top