Connecting using Windows Authentication

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When connecting to SQL Server from Access, how does one connect using Windows
Authentication rather than a login name and password? Is it possible or do I
need to have the Admin give me an account?
Thx,
Shane
 
As far as I know, and I must admit I have very limited knowledge regarding
this issue, you do not have to enter anything at all providing that the user
context the access.exe process runs under has appropriate rights on the sql
database you are trying to approach.
 
Dirk - the connection string looks like this:

Set cnDB = CreateObject("ADODB.Connection")
cnDB.ConnectionString = "Provider=SQLOLEDB.1;" _
& "Initial Catalog=ProjectServer;Data Source=jnicapproject"

As you can see, I've left off the userid and password parameters. When I run
it, I get an "Invalid Authorization Specification" error. I'm assuming that
the SQL Server provider is expecting something to let it know how to log in
the user.
 
You would use the following to authenticate using Windows NT integrated
security:

Set cnDB = CreateObject("ADODB.Connection")
cnDB.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;" _
& "Persist Security Info=False;Initial Catalog=ProjectServer;Data
Source=jnicapproject"

HTH,
Branden Johnson
 
Branden - you are the man!

Branden Johnson said:
You would use the following to authenticate using Windows NT integrated
security:

Set cnDB = CreateObject("ADODB.Connection")
cnDB.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;" _
& "Persist Security Info=False;Initial Catalog=ProjectServer;Data
Source=jnicapproject"

HTH,
Branden Johnson
 
Back
Top