[BangPypers] Django with MSSQL Server 2008

Syed Awase khirni awasekhirni at gmail.com
Thu Sep 26 17:11:11 CEST 2013


Hello All,

I am a new to Django and i am trying to do some intial bit of learning
myself. I am having difficulty with SQLServer drivers with ADO and pyodbc.
Can any body suggest me exactly the approach. Please find the code in my
settings.py file.

If you could also provide me pointers to downloading the working version of
ADO and pyodbc it will be helpful.

DATABASES = {
    'default': {
        'ENGINE': 'sql_server.pyodbc',  # Have also tried
sql_server.pyodbc,sqlserver_ado',
        'NAME': 'tprone',
        'USER': 'awase', # Omitted for post
        'PASSWORD': '$lny786#', # Omitted for post
        'HOST': 'localhost',
        'PORT': '12345',
        'OPTIONS': {
 #           'provider': 'SQLCLI10', # Have also tried 'SQLCLI11' and
'SQLOLEDB'

             'provider': 'SQLOLEDB',
            'use_mars': True,
            'extra_params': 'DataTypeCompatibility=80'
            }
    }
}

thanks

Awase


More information about the BangPypers mailing list