|
Posted by Simon Hayes on 09/08/05 11:35
You can connect to a server like this in C#:
SQLDMO.SQLServer2 srv = new SQLDMO.SQLServer2();
srv.Name = "MyServer";
srv.LoginSecure = true;
srv.Connect(null,null,null);
Then you can access the various properties and methods - see Books
Online for the full SQLDMO object model. As I mentioned in reply to
your previous post, SQLDMO is executing TSQL behind the scenes, and it
requires an authenticated connection to the SQL Server for most
operations. An exception to this would be using something like the
Application.ListAvailableSQLServers() method, but for anything where
you're querying the properties of a specific instance, you will need to
log on to MSSQL.
Simon
Navigation:
[Reply to this message]
|