4

Does anyone know how to use the django-mssql provider? I've installed the requirements but I cannot get it to work.

Without sqlserver_ado in settings.py it imports fine:

(testenv) C:\Users\Robin\test>python manage.py shell
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import sqlserver_ado
>>> ^Z

With a database set to use sqlserver_ado in settings.py:

(testenv) C:\Users\Robin\test>python manage.py shell
ImproperlyConfigured: 'sqlserver_ado' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
    u'mysql', u'oracle', u'postgresql_psycopg2', u'sqlite3'
Error was: cannot import name InterfaceError

EDIT:

Django==1.5 django-mssql==1.5b1

EDIT 2:

Browsing the source for django-mssql reveals that it's trying to import InterfaceError from django.db.utils which doesn't exist in Django 1.5

Robin Elvin
  • 1,207
  • 12
  • 28

1 Answers1

4

It's mentioned on the project's Bitbucket page at https://bitbucket.org/Manfre/django-mssql/overview that:

"The current version of django-mssql supports Django 1.6. If using an older version of Django, you will need to use an earlier version of django-mssql.

django-mssql 1.4 supports Django 1.4 and 1.5."

I installed 1.4 and now I just need to get the provider working.

Robin Elvin
  • 1,207
  • 12
  • 28
  • and what about django 1.8.1? can you please tell me which version of djonago-mssql is suitable? – Harsha Biyani Sep 30 '15 at 08:33
  • @HarshaBiyani I've just had a look at the project page and it seems the latest django-mssql is 1.7 which supports Django 1.7. Looking at the commits to master it would appear that a 1.8 compatible version is in development. – Robin Elvin Sep 30 '15 at 11:20