Connection Strings/Authentication

  • Sql2k, Mixed Mode Authentication, Win2003. I have a VB app (actually a VB script) that connects to a Sql Server DB and runs some queries.  Here is the connection string it currently uses:

    Dim mhcConn

    set mhcConn = CreateObject("ADODB.Connection")

    Err.Number = 0

    mhcConn.Open "Driver={SQL Server};Server=MiniBase-Sql-002;" & _

    "Database=Employee;UID=myId;PWD=myPword"

    Is it possible to change the connection string so that it uses Windows Authentication?  If so what would be the syntax?  Any help would be greatly appreciated.

  • Thanks, this worked like a charm:

    Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Trusted_Connection=Yes;

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply