[dba-SQLServer] Trusted_Connection
    Gustav Brock 
    gustav at cactus.dk
       
    Thu Apr 14 10:41:34 CDT 2016
    
    
  
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
    
    
More information about the dba-SQLServer
mailing list