Steynsk
asked on
ADODB integrated authenticantion instead of username and password authenticantion
Hallo Expert,
I am relatively new in ASP and need to switch from username+password ADODB authentication to integrated authentication ADODB.
My database is MSSQL 2005
My username+password ADODB authentication looks like this. And it is included in all my ASP sites.
Can someone please tell me how to change the code so it works with authentication to integrated authentication ADODB?
And do I have to change other parts in my code as well or only this part?
Thanks,
Steynsk
I am relatively new in ASP and need to switch from username+password ADODB authentication to integrated authentication ADODB.
My database is MSSQL 2005
My username+password ADODB authentication looks like this. And it is included in all my ASP sites.
Can someone please tell me how to change the code so it works with authentication to integrated authentication ADODB?
And do I have to change other parts in my code as well or only this part?
Thanks,
Steynsk
Set CS = Server.CreateObject("ADODB.Connection")
CS.Open "DSN=MyDNS;Uid=MyUsername;Pwd=MyPassword"
query = "SELECT * FROM tablename"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open query, CS
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
If SQL Server is located on remote machine you will need to configure IIS site service account to run under domain account. Here is one more example of connection string:
"Provider=SQLOLEDB;Integra