Reputation: 295
When Attempting to connect to my database server and database in Django, I am getting the error (django.db.utils.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)'), and I am not sure why
settings.py
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'MY_DATABASE_NAME',
'HOST': '13.0.4001.0',
'USER': 'MY_USERNAME',
'PASSWORD': 'MY_PASSWORD',
'CONN_MAX_AGE': 1000,
'PORT': '8000',
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
}
},
}
How would I fix this error, and start getting/editing data from my database
Upvotes: 2
Views: 606
Reputation: 26
hi check the version of your SQL server and try download of drive connector , I was the same problem then i install the driver ODBC 17 and the problem was solved.
Upvotes: 1