I need to connect a django project to an excisting MS SQL-Server database however I'm getting an error I don't understand:
django.db.utils.InterfaceError: ('IM002', '[IM002] [Microsoft][Driver Manager ODBC] Nome origine dati non trovato e driver predefinito non specificato. (0) (SQLDriverConnect)')
English translation I found after googling this:
django.db.utils.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')
I have no idea what this means, however, I found this question which showed how to setup the DATABASES
values in django. Currently my DATABASES
looks like this:
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': '<DATABASE NAME>',
'HOST': '<PCNAME>\SQLEXPRESS',
'USER': '<USERNAME>',
'PASSWORD': '<PASSWORD>',
'PORT': '',
'OPTIONS': {
'driver': 'SQL Native Client',
'dsn': 'dsn_entry',
'host_is_server': True
}
}
}
the server is on localhost and I'm using windows 7, django 2.1, python 3.7 and SQL Server 2014 Express
What is this error and what am I doing wrong?