Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2009
    Posts
    4

    Question Unanswered: Can't connect to SQL DB server

    Hi all,

    I have a DB server PC and client PC.
    My Server is set at Mix mode.

    when I pass the connection string and connect to DB. it said
    "Login failed for user ''. The user is not associated with a trusted SQL Server connection."

    My connection is
    "Provider=SQLOLEDB;Data Source=1x2.xx.5x.26\SQLEXPRESS;Initial Catalog=DBTester;Trusted_Connection=Yes;User ID=sa;Password=saAdmin"

    I already set "sa" account to dbowner and the DBTester I tried to access is also owned by "sa".

    I'm trying to connect to SQL Server Express 2005 from my vbscript.
    Can anybody help me??
    this is Client PC connect to Server PC.

    Thanks.

  2. #2
    Join Date
    Oct 2009
    Posts
    19
    Change Trusted_Connection to false.
    You can't have trusted and username/password pair in the same string

    More info
    -----------------------------------
    Free SQL server monitoring for DBA's
    SQL DBA manager by BlueThames.com

  3. #3
    Join Date
    Oct 2009
    Posts
    4
    Quote Originally Posted by OxfordSmarty
    Change Trusted_Connection to false.
    You can't have trusted and username/password pair in the same string

    More info
    Hi OxfordSmarty,

    Thanks for your info. I will test it after I got a chance. Now i'm standby for another project the whole day.

    After I test, I will post my result here.
    Thanks again.

  4. #4
    Join Date
    Oct 2009
    Posts
    4

    Thumbs up

    Quote Originally Posted by OxfordSmarty
    Change Trusted_Connection to false.
    You can't have trusted and username/password pair in the same string

    More info

    Hi OxfordSmarty,
    Thanks. When I remove it, its working well.


  5. #5
    Join Date
    Oct 2009
    Posts
    4
    By the way, I can't find the place where I can close this Thread.

    Is there any link or place I should click to close this thread?

    Thanks.

  6. #6
    Join Date
    Oct 2009
    Posts
    19
    I don't know how close a thread, I'm new to this forum myself
    -----------------------------------
    Free SQL server monitoring for DBA's
    SQL DBA manager by BlueThames.com

  7. #7
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Threads are never closed here, but it is nice, if you would post the solution, so when folks stumble on this thread via the search page, they will have their answer, and not have to post, themselves.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •