I am trying to connect to a MS sql database using pymssql, following is my line of code
import pymssql as ms
conn = ms.connect(host='xyz\SQLEXPRESS',user='abc', password='abc', database='Testdb')
except ms.DatabaseError as e:
print('database error ', e.args)
and am always getting following error.
database error ((20009, b’DB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (xyz\SQLEXPRESS)\n’),)
Notice that in above error message \ is appended, though i have given single slash.
Please advice solution.