Results 1 to 4 of 4
  1. #1
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    670

    Connect To SQL Server With Passed Credentials


    I am attempting to use a "standard" user name / password combo to use access to run a sql server stored procedure. This is the connection string part
    Code:
    con.Open "Provider=SQLOLEDB;Data Source=PServer;Initial Catalog=Test;User Id=testuser;Password=testpwd;Integrated Security=SSPI;Trusted_Connection=Yes;"
    But whenever a user tries to run this they get the error,
    Code:
    Error user Domain\user Does not have access
    Why is it even attempting to authenticate with a specific users credentials when I have passed the credentials I want to use in the syntax?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I think because you've included "Trusted_Connection=Yes".
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    670
    Ah good call on that. Thank you

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-15-2013, 12:12 PM
  2. Cannot Connect To SQL Server Using Working DSN
    By mes5464 in forum SQL Server
    Replies: 4
    Last Post: 04-03-2013, 12:08 PM
  3. Connect To SQL Server
    By beso in forum Access
    Replies: 1
    Last Post: 12-23-2011, 01:19 PM
  4. Need Urgent Help [Related Connect DB to Server]
    By gunapriyan in forum Access
    Replies: 0
    Last Post: 08-18-2010, 09:49 AM
  5. Replies: 5
    Last Post: 03-29-2009, 07:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums