Question: I have a Django Project and want to connect to SQL Server 2019. But I have a problem when doing migration. Here is the error message:

> 
> django.db.utils.NotSupportedError: SQL Server v15 is not supported.
> 
> 
> 

I'm using `Django 2.1.15` and `SQL Server Microsoft SQL Server 2019 (RTM) - 15.0.2000.5`.

Does it mean this Django version cannot using SQL Server 2019?

Answer: 
I just create an account to answer thi question. I lost a lot of time until can fix that. 

To work with SQL Server 2019 i nedded to update the Django to actual version, 3.x and installed django-mssql-backend, django-pyodbc, pyodbc

In youd DATABASE definitions, add this line to work:

'OPTIONS': {
 'driver': 'ODBC Driver 17 for SQL Server',
 },
By adding the code below to **"settings.py"**, you can check which **ODBC Driver Version** to use. \*In my case, it's **"ODBC Driver 17 for SQL Server"**:

```py
# "settings.py"

import pyodbc
print("This is " + pyodbc.drivers()[-1]) # ODBC Driver 17 for SQL Server

```

So for example, I use [**mssql-django**](https://i.stack.imgur.com/Qkjqf.png) to connect **Django** to **MSSQL(SQL Server)** with **SQL Server Authentication**. \*I use **SQL Server 2019 Express**.

So, set the code below with **"ODBC Driver 17 for SQL Server"** in **"OPTIONS"** to **"settings.py"**:

```py
# "settings.py"

DATABASES = {
    'default':{
        'ENGINE':'mssql',  
        'NAME':'test',           
        'USER':'john',                      
        'PASSWORD':'johnpw',                
        'HOST':'DESKTOP-QVRCPTA\SQLEXPRESS',
        'PORT':'',                           
        'OPTIONS': { # Here
            'driver': 'ODBC Driver 17 for SQL Server', 
        },
    }
}

```