Re: Make SQL connection with Windows Auth? by Jason
Jason
Fri Jun 24 15:31:36 CDT 2005
You can use a trusted connection. But there is no way to pass another
domain\username to it.
If you have it in a VBScript, you can run that script as another user using
a RunAs command.
Use Integrated Security=SSPI;
in place of uid and pwd
Regards,
Jason
"TEC" <tcolgrove.nospam.@remove.ent-exchange.nospam.com> wrote in message
news:ugmu7YPeFHA.1404@TK2MSFTNGP09.phx.gbl...
> Here is my SQL snippet:
>
> Set connect = CreateObject("ADODB.Connection")
> strDSN =
>
"Provider=SQLOLEDB;Server=servername;uid=username;pwd=password;database=dbna
me"
> connect.Open strDSN
>
> If I use a local SQL account, no problems.
> How do I pass it a windows account and password?
> I have tried domain\username and it doesnot like that (using an account
that
> is a dbowner)
> Any help?
> Thanks and appreciated
> TC
>
>