michiya / django-pyodbc-azure

Django backend for Microsoft SQL Server and Azure SQL Database using pyodbc
https://pypi.python.org/pypi/django-pyodbc-azure
BSD 3-Clause "New" or "Revised" License
321 stars 140 forks source link

SQL Server v15 is not supported. #209

Closed mythox closed 5 years ago

mythox commented 5 years ago

Hi, i'm trying to connect django-pyodbc-azure to MSSQL 2017 Linux Edition via ODBC Driver 17 for SQL Server Driver, however I've got an error message: SQL Server v15 is not supported. is it really not yet support v15? any plan to support it? thankyou

kevin-olbrich commented 5 years ago

Sounds like your ODBC driver is too old(?) I'm running SQL 2017 (Windows Edition) in production with django-pyodbc-azure using the original MS-ODBC driver.

mythox commented 5 years ago

Hi Kevin, thx for your advise, i'm using "ODBC Driver 17 for SQL Server", I can connect to the SQL server with this driver thru window ODBC settings, but django-pyodbc-azure response v15 is not supported, might be there are some different on MSSQL 2017 Linux Edition

mythox commented 5 years ago

my stupid fault, wrongly installed preview version of MSSQL 2019 (v15), case close, sorry for your time

VarunAravinth commented 4 years ago

Hi Guys, I am getting the same error, v15 is not supported, I am using django-mssql-backend. Can you help me out.

File "C:\Users\VarunAravinthN\AppData\Roaming\Python\Python38\site-packages\sql_server\pyodbc\base.py", line 384, in sql_server_version raise NotSupportedError('SQL Server v%d is not supported.' % ver) django.db.utils.NotSupportedError: SQL Server v15 is not supported.

VarunAravinth commented 4 years ago

Got it fixed, I upgraded my django-sql-backend. Thanks

s-trooper commented 4 years ago

Hi, i have the same Problem. Can anyone help me? What exactly i have to upgrade/change? My system:

Django-2.1.15
django_pyodbc_azure-2.1.0.0
ODBC Driver 17 for SQL Server
VarunAravinth commented 4 years ago

@s-trooper Hi, Can you check whether SQL V15 is supported by your odbc driver, (django_pyodbc_azure), if yes, check whether you are running the latest version of that driver. That fixed my issue.

s-trooper commented 4 years ago

@VarunAravinth, ty for Help. I already have had the latest Driver, but i found that django_pyodbc_azure has a hardcoded support only for SQL lower than V15. The solution for me was, upgrade to an other package:

pip install django-mssql-backend
maheshkathiriya commented 4 years ago

Hi, Please check: https://pypi.org/project/django-pyodbc-azure-2019/ My Code working with mssql 2019

pip install django-pyodbc-azure-2019

DATABASES = {
    'default': {
        'ENGINE': 'sql_server.pyodbc',
        'NAME': 'djangotestdb',
        'USER': 'sa',
        'PASSWORD': '12345678',
        'HOST': 'LAPTOP-MAHESH\SQLEXPRESS',
        'PORT': '',
        'OPTIONS': {
            'driver': 'ODBC Driver 17 for SQL Server',
        },
    },
}
laibamasod commented 1 year ago

I have the same issue, I installed and then uninstalled django-pyodbc-azure, now im using django-mssql-backend I get the issue of odbc not supported or raise NotSupportedError('SQL Server v%d is not supported.' % ver) django.db.utils.NotSupportedError: SQL Server v16 is not supported.

How do I check which version is supported? Should I reinstall mssql?