In the connection string, the PORT is written twice, instead of only once.
Use string.format, to create the connection string, it is much nicer and pythonic.
For example:
server = "server"
username = "username"
password = "password"
driver= '{ODBC Driver 13 for SQL Server}'
database = "database"
connection_string = 'DRIVER={driver};PORT=1433;SERVER={server};DATABASE={database};UID={username};PWD={password}'.format(
driver=driver, server=server, database=database, username=username, password=password)
Thanks
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@bityob Thanks - good catch - fixing now.
@bityob fix will be live at 4 PM today
Most helpful comment
@bityob Thanks - good catch - fixing now.