Ryan

Ryan

  • NA
  • 7
  • 0

Sql Server - Finding database catalogs using Windows Authentication?

Jun 26 2007 11:20 AM
I have code that works to connect to a database and finds all of the catalogs using sql server authentication. It is as follows:

private SQLDMO.SQLServer srv = new SQLDMO.SQLServerClass();
srv.Connect(ServerName,Login,Password);


This is all good and well, but I want to also allow the user to log in using Windows Authentication. The problem here being that I the srv.Connect method Must have a login and password, but I do not know how to pass these parameters. How can I do this?

Answers (2)