2

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

1 Answer 1

1

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.

Drive SQL

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.