I am using pthon3.6.2
+ django1.11.4
+ django-mssql1.8
combination for my web application and unable to connect to sql server
database. Following is the setting I am using in setting.py
DATABASES = {
'default': {
'NAME': 'DB1',
'ENGINE': 'sqlserver_ado',
'HOST': '192.168.5.245',
'USER': 'user1',
'PASSWORD': '123456',
}
}
I am getting the following error :
Finally I got the solution. I still don't know whether that combination supports or not. Instead of django-mssql I am using django-pyodbc-azure 1.11.0.0
Installation :
pip install django-pyodbc-azure
Following is the code at settings.py. It workis properly.
'default': {
'NAME': 'DB1',
'ENGINE': 'sql_server.pyodbc',
'HOST': '192.168.5.245',
'USER': 'user1',
'PASSWORD': '123456',
'OPTIONS' : {
'driver' : 'SQL Server Native Client 11.0'
}
}