Options

SQL Connection with Windows Authentication Mode only

ChessExpertChessExpert Member Posts: 103
Hello there experts. Does anybody know if it is possible to connect to SQL Server with Windows Authentication Mode only.

Here is my connection string,

adoConnection.ConnectionString :=
'Driver={SQL Server};Server=SampleServer;Database=Sales;Uid=OurDomain\ChessExpert;Pwd=ChessExpertPassword;';

I am getting this error when I execute the connection.
"Login failed for user 'OurDomain\ChessExpert'. The user is not associated with a trusted SQL Server connection."

I hope anybody could give me an example if they have done this before.

Thank you in advance.
ChessExpert

Answers

  • Options
    bbrownbbrown Member Posts: 3,268
    Yes, it should be. Use"trusted connection" and not user and password

    Trusted_Connection=yes
    There are no bugs - only undocumented features.
  • Options
    bbrownbbrown Member Posts: 3,268
    There are no bugs - only undocumented features.
  • Options
    ChessExpertChessExpert Member Posts: 103
    Thank you bbrown. It worked right away. Thanks a lot. Thanks for the ConnectString link too, that was pretty handy. ChessExpert.
Sign In or Register to comment.