2
Answers

Sql Server - Finding database catalogs using Windows Authentication?

Ask a question
Ryan

Ryan

17y
2k
1
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)