Sorry, you have to change your local ODBC DSN settings, not the connection string.
Open this Exe and look for your DSN Name and change the Config for your DSN entry:
C:\Windows\sysWOW64\odbcad32.exe
Also check if you do not have 64bit Windows this ODBC Manager to find your DSN entry:
C:\Windows\system32\odbcad32.exe
Please write more details here on EE.
Nobody can look at your script lines and guess what is your environment and what is going wrong without error message details.
Therefor post here your complette error message and state whether you use ODBC DSN or now you try to connect without local ODBC manager.
Look at this and choose some of the options suitable for you:
https://www.connectionstrings.com/sql-server/