Arvind
Arvind

Reputation: 11

error in connecting SQL server in django

DATABASES = {
    'default': {
        'ENGINE': 'sql_server.pyodbc',
        'NAME': 'HQ-2632',
        'USER': '*****',
        'PASSWORD': '*****',
        'HOST': 'myserver.database.windows.net',
        'PORT': '',

        'OPTIONS': {
            'driver': 'SQL Server Native Client 11.0',
        },
    },
}


Error: ('IM002', '[IM002] [Microsoft ][ODBC Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')

Upvotes: 1

Views: 157

Answers (1)

ahmed
ahmed

Reputation: 5590

Did you install sql_server.pyodbc? You can install it using:

pip install sql_server.pyodbc

Upvotes: 1

Related Questions