Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / December 2005

Tip: Looking for answers? Try searching our database.

Connecting using Windows Authentication

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shane - 16 Dec 2005 15:27 GMT
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
Dirk - 16 Dec 2005 16:04 GMT
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.

> 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
Shane - 16 Dec 2005 16:43 GMT
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.

> 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
[quoted text clipped - 6 lines]
> > Thx,
> > Shane
Branden Johnson - 16 Dec 2005 23:14 GMT
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

> Dirk - the connection string looks like this:
>
[quoted text clipped - 17 lines]
> > > Thx,
> > > Shane
Shane - 19 Dec 2005 16:02 GMT
Branden - you are the man!

> You would use the following to authenticate using Windows NT integrated
> security:
[quoted text clipped - 36 lines]
> > > > Thx,
> > > > Shane
Branden Johnson - 20 Dec 2005 05:51 GMT
Shane,

Glad I could help!

Branden
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.