SqlVersion authentication

Dec 15, 2009 at 8:13 PM

I need to use SqlVersion with a database that supports SQL authentication (Windows auth is not feasible in this environment).  The SqlVersion class doesn't have userid/password properties  (whereas the SqlCmd class provides LogOn and Password parameters).  How can I provide userid/password instead of the apparently default Windows auth?  [I noticed a settings.settings file in the source code, but don't see how to make use of it.]

Dec 15, 2009 at 9:44 PM

I think you just need to provide UserName and UserPassword. Note that the task derives off BaseTask which provides these.

if you provide those, then the connectionstring is built as below:

.....@"Data Source={0};Initial Catalog={1};UID={2};PWD={3}", this.MachineName, this.DatabaseName, this.UserName, this.UserPassword);

Does that help?