How to use MS Access to connect to a SQL server using "Windows Authentication"?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anoble1
    New Member
    • Jul 2008
    • 246

    How to use MS Access to connect to a SQL server using "Windows Authentication"?

    Hi,

    I am having a slight problem connecting to my SQL Server using MS Access. My SQL server does not use a Username adn Password like all the other ones I have seen. They use the "windows authentication" . How do you let access use "windows authentication" ? Are you supposed to use the UID? And PASS? Is their a workaround?

    Code:
    Public Function PingTRIPSDatabaseITUAServer()
    
         Dim connectString As String
          'connectString = "ODBC;Driver={SQL Server};Server=GAXGPSQ05UA;Database=TRIPS;UID=trimsuser;pwd=trimsdata"
          connectString = "ODBC;Driver={SQL Server};Server=ALBHM01CGSERVER;Database=Core;UID=????;pwd=????"
          Set db = DBEngine.OpenDatabase("", False, True, connectString)
      End Function
    Last edited by anoble1; May 7 '12, 04:44 PM. Reason: Aditional info
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Use a trusted connection
    Trusted_Connect ion=yes

    Comment

    Working...