0
DATABASES = {
    'default': {
    'NAME': 'CVH_Dev',
    'ENGINE': 'sqlserver_ado',
    'HOST': '127.0.0.1',
    'USER': '',
    'PASSWORD': '',
    'OPTIONS': {
        'provider': 'SQLOLEDB',
        'use_legacy_date_fields': 'True'
    }
}

I was tried above code . but it shows error message.

Error Messgae: File "C:\Python27\lib\site-packages\django\db\utils.py", line 134, in load_backend raise ImproperlyConfigured(error_msg) django.core.exceptions.ImproperlyConfigured: 'sqlserver_ado' isn't an available database backend. Try using 'django.db.backends.XXX', where XXX is one of: 'mysql', 'oracle', 'postgresql', 'sqlite3' Error was: No module named util

please tell me how to connect SQL server 2008 to my django project.. now I m using SQL server2008R2

2 Answers 2

1

Django doesn't support MSSql out of the box. I would suggest trying an external package, like django-mssql.

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

3 Comments

yes, i already installed django-mssql, but it dosen't work. Can you tell me how to use it..
Are you sure you have set up your environment properly? Error message suggests that django-mssql is not found in the sys.path. Make sure to double check that by using pip list.
yes i installed. see this Django (1.10.3) django-mssql (1.6.2) django-sqlserver (1.7) pip (9.0.1) pyodbc (3.0.10) setuptools (20.10.1) sql-server.pyodbc (1.0)
0

From the code that I see you are trying to use third party package Django MSSQL which needs these settings. To make these settings available for Django you first need to:-

pip install django-mssql 

For further reference you can read:- http://django-mssql.readthedocs.io/en/latest/quickstart.html

1 Comment

i want to connect with sql server

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.