Hi,
Using an add-in, I am trying to create toolbar buttons that connect the Visual Studio 2010 Sql Editor to a specific database. (I think clicking through the connection dialog box and the datadase dropdown for every single file I want to connect is very frustrating).
I already found out, that in its black box, VS 2010 does something like this (just recorded a macro and looked at what it's doing):
var customOut = new Object(); _applicationObject.ExecuteCommand("Data.SqlEditorConnect"); _applicationObject.Commands.Raise("{09E21035-245E-4FFE-AE74-105773C29CC7}", 25858, "DatabaseName", customOut);
The only problem is, that the Data.SqlEditorCommand brings up the the connection dialog box.
Is there a way to give this command a parameter that tells it not to show the dialog box? And if there isn't, is there any other way to make the SqlEditor connect to a database?
Thanks for the help.
F.M.