Logon via windows authentication with specified user in connect string

Hello,

I want to logon via ADO in a database to another database via windows authentication. In the connectstring I give the user name (domain\user) and password and I put also the parameter Trusted connection to yes. Then I can logon to the SQL database, but not with the user I gave in the connect string, it is with the user I am connected with.

What has to be done to connect via windows authentication but not with the user I logged in, but with the user specified in the connect string ? Is this possible ?

Thanks for help.

0 answers