Connect to mssql server & run code-NOT connect to a databas

Windows specific forum
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Connect to mssql server & run code-NOT connect to a databas

Post by jassing »

I need to connect to a mssql server and run some code -- this code is specifically detaching and attaching databases to a server...
I have been unsuccessful so far - does anyone have any suggestions?

I'm trying to avoid shelling to osql or sqlcmd

thanks
-josh