[AccessD] Trusted_Connection

Jim Lawrence accessd at shaw.ca
Thu Apr 14 14:49:00 CDT 2016


Hi Gustav:

I am sure that the attribute use to be "true/false" and still is under certain circumstances. Why would the attribute be changed be changed to "yes/no". Maybe "yes/no" was more explanatory so some programmer decided to change it.(?)

Always used: Integrated Security=SSPI; or Integrated Security=False; attribute instead.

Jim

----- Original Message -----
From: "Gustav Brock" <gustav at cactus.dk>
To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com>, "Discussion concerning MS SQL Server (dba-sqlserver at databaseadvisors.com)" <dba-sqlserver at databaseadvisors.com>
Sent: Thursday, April 14, 2016 8:41:34 AM
Subject: [AccessD] Trusted_Connection

Hi all

I was about adjusting some code for setting the connection string for SQL Server.
The code replaces all the {n} strings:

    Const cstrConnect   As String = _
        "ODBC;" & _
        "DRIVER=SQL Server;" & _
        "Description=Brand name;" & _
        "APP=Microsoft(r) Access;" & _
        "SERVER={0};" & _
        "DATABASE={1};" & _
        "UID={2};" & _
        "PWD={3};" & _
        "Trusted_Connection=False;"

Did you notice the error here?

I didn't, and it took me quite a while with popping messageboxes about "Trusted connection failed" including wasted searching time with faulty answers to find out why.
Because it must read:

        "Trusted_Connection=No;"

Oh well. Details are important.

/gustav

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list