Questions tagged [django-pyodbc]

A 3rd-party database backend for Django that uses ODBC to query Microsoft SQL Server. The typical driver stack is django-pyodbc -> pyodbc -> unixodbc -> freetds on Linux.

A 3rd-party database backend for Django that uses ODBC to query Microsoft SQL Server. The typical driver stack is django-pyodbc -> pyodbc -> unixodbc -> freetds on Linux.

As for 5/2014, this fork is most active maintained: https://github.com/lionheart/django-pyodbc/

85 questions
3
votes
3 answers

django-pyodbc-azure - How to use schemas

I'm using django-pyodbc-azure (https://github.com/michiya/django-pyodbc-azure) and everything is working fine. However, when I migrate the models, a new schema called 'dbo' is created on the SQL Server database. I want to use an already existing…
ikermdagirre
  • 53
  • 1
  • 5
3
votes
0 answers

Is it possible to use django-pyodbc with iSeries Access ODBC Driver?

I am trying to get Django-pyodbc to work with DB2 on IBM i using the standard IBM i Access ODBC driver. I know there is a Django DB implementation supported by IBM, but that requires the DB2 Connect product, which is (for us) prohibitively…
RichardX
  • 51
  • 3
3
votes
1 answer

Exception Value: ('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)')

I'm using the pyodbc library to connect to a remote instance of sql server on windows from a python djanog web app running on an ubuntu Vm. I have a database connection class, as below, which breaks on the line where I try and create a connection of…
Mark Corrigan
  • 544
  • 2
  • 11
  • 29
3
votes
2 answers

django-pyodbc: MSSQL unicode issue

I'm having problems logging in users on Django using django-pyodbc, freetds and unixodbc. I can run syncdb and connect with pyodbc without any problems. The full error that I get is: ('42000', '[42000] [FreeTDS][SQL Server]Unicode data in a…
dan-klasson
  • 13,734
  • 14
  • 63
  • 101
3
votes
3 answers

Can't query SQL Server from django using django-pyodbc

I'm trying to sync an SQL Server 2008 R2 database running remotely on IIS 7, to a django 1.6 app running python 3.3 on Windows 7, using manage.py syncdb. However I am being met with the error, TypeError: The first argument to execute must be a…
aidan
  • 33
  • 1
  • 5
3
votes
1 answer

How can I connect to SQL Server 2008 R2 with django-mssql?

I cannot figure out why I cannot get django to connect with sql server 2008 r2. I have administrative privileges on our server and on sql server. I have constructed a virtual windows box with windows server 2008 sp2 because I thought I might have…
Justin O Barber
  • 11,291
  • 2
  • 40
  • 45
2
votes
0 answers

Single space character returned on model fields from django-pyodbc instead of empty string

I have some models that are stored on a SQLServer and are accessed using django-pyodbc. On the server our code is working fine but on our development machines we've started to see models get returned with a single space character on fields that…
Seán Hayes
  • 4,060
  • 4
  • 33
  • 48
2
votes
1 answer

How to fix pyodbc dependency errors when upgrade Django from 2.1 to 2.2.13?

Since version 2.1 has been marked as insecure I need to upgrade at least to >=2.2. Github security suggests installing 2.2.13. I also need to install other packages that only work with Django >=2.2. The Django upgrade is successful but when pipenv…
2
votes
2 answers

Connecting Django to Microsoft SQL Database

I want to connect my django application to MS-SQL server 2014 database. I wrote this code for making connections. DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', 'HOST':'DESKTOP-6UNRAN0', 'PORT':'1433', 'NAME': 'MOVIE', …
2
votes
1 answer

Execute query with multiline string

I try to directly access DB and render data on my webpage. Evereything works properly with one line SQL query but multiline queries. My SQL Query consist of many joins and uses temp tables! I tried def merchant_ajax(request): data = dict() …
Bagao
  • 33
  • 1
  • 4
2
votes
1 answer

Given an ODBC connection string for a database, how can I modify my settings.py such that my Django app will connect to it?

I have been given an ODBC connection string to connect to a database. However, I am having difficulty in having my Django app to connect to it. What are the proper steps to have my app to connect to it? Am I missing anything in my code? This is my…
2
votes
2 answers

MSSQL django_pyodbc connectivity issues

I am trying to connect to MSSQL with help of django-pyodbc. I have installed all the required packages like FreeTDS, unixODBC and django-pyodbc. When I connect using tsql and isql I am able to connect:- >tsql -S mssql -U ********* -P…
Prats
  • 1,515
  • 6
  • 16
  • 30
2
votes
0 answers

For a github repository that is no longer maintained, how do developers agree on which fork to use to focus all their work on?

So I'm looking at the michiya/django-pyodbc-azure repository. It's a great project, but it seems to be unmaintained. There are lots of forks of the project, and I'm not sure which one to follow. The nice thing about github is that it makes it easy…
Shadi
  • 9,742
  • 4
  • 43
  • 65
2
votes
1 answer

django-pyodbc for Django 1.11

I am currently using Django 1.11.1 and am trying to connect to my iSeries Database using the django-pyodbc engine. However all the documentation I can find states django-pyodbc is only supported through Django 1.10. Is there any coding…
2
votes
0 answers

MS SQL Connection to Python

I'm getting an error that Django did not find the pyodbc library in the build directory. Will use an installed version. Traceback (most recent call last): File "C:\Users\ggang1\Downloads\pyodbc-4.0.17\pyodbc-4.0.17\tests3\test.py", line 5, in…
Gaurav Gangwar
  • 467
  • 3
  • 11
  • 24