SQL Server Security in ADO Connection
I am writing a site using ASP pages (VBScript, ADO 2.5) and would like to create a connection to a SQL Server 2k database that will use the users NT security to log in and give permissions.
How do I code this?
Web Development
I am writing a site using ASP pages (VBScript, ADO 2.5) and would like to create a connection to a SQL Server 2k database that will use the users NT security to log in and give permissions.
How do I code this?
by abc
Dim strConnect, Conn, Rs
strConnect = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=;Password=;Initial Catalog=;Data Source="
Set Conn = server.CreateObject("adodb.connection")
Conn.Open strConnect
Set Rs = server.CreateObject("adodb.recordset")
Rs.Open , Conn
Note: Ommit <> wherever you find in above connection string
by munrrob
Poster rated this answer.
by abc
Sorry, Disregard my previous answer.. this is the correct one.
Dim strConnect, Conn, Rs
strConnect = "Provider=SQLOLEDB.1;Persist Security Info=True;Trusted_Connection=yes;User ID=;Password=;Initial Catalog=;Data Source="
Set Conn = server.CreateObject("adodb.connection")
Conn.Open strConnect
Set Rs = server.CreateObject("adodb.recordset")
by munrrob
Poster rated this answer.
by munrrob
This discussion is closed to new replies.
Sort by Trending