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
18
votes
6 answers

Is there any way to use GUIDs in django?

I have a couple of tables that are joined by GUIDs in SQL Server. Now, I've found a few custom fields to add support for GUIDs in django, but I tend to shy away from using code in blog posts if at all possible. I'm not going to do anything with…
Jason Baker
  • 192,085
  • 135
  • 376
  • 510
9
votes
1 answer

pyodbc on SQL Server - How can I do an insert and get the row ID back?

I'm using pyodbc with SQL Server 2000. I want to be able to insert a row and get the auto incremented row id value back? Any ideas? Here's what I have so far: cursor.execute("insert into products(id, name) values ('pyodbc', 'awesome…
Greg
  • 45,306
  • 89
  • 231
  • 297
9
votes
1 answer

Django-pydobc SQL server connection problems on windows

Another developer and I are setting up a django (v1.4.2) project using a legacy SQL server database (SQLEXPRESS) on another server. So far, we have been able to connect to the database from linux and mac using django-pyodbc, and from a laptop…
Hans
  • 91
  • 1
  • 4
5
votes
1 answer

Prevent Django from updating identity column in MSSQL

I'm working with a legacy DB in MSSQL. We have a table that has two columns that are causing me problems: class Emp(models.Model): empid = models.IntegerField(_("Unique ID"), unique=True, db_column=u'EMPID') ssn =…
5
votes
1 answer

django-pyodbc vs django-mssql

It's in the title really. I want to run Django against MSSQL 2005. Both look reasonably active and up to date. I can't seem to see any unique points for either. Can anyone recommend one over the other? Would it be trivial to swap between the two…
Joe
  • 46,419
  • 33
  • 155
  • 245
5
votes
2 answers

How to make connection in python to connect as400 and call any as400 programs with parameter

Anyone knows How to make connection in python to connect as400 iseries system and call any as400 programs with parameter. For example how to create library by connecting as400 through python. I want to call " CRTLIB LIB(TEST) " from python script. I…
MagicBox
  • 63
  • 1
  • 1
  • 6
5
votes
2 answers

Attempting to connect to MSSQL with django-pyodbc-azure results in file not found error

I think my question is more or less a duplicate of Trying to query SQL Server from django running on Linux - Can't open lib '/path/to/libtdsodbc.so', but the answer there is wholly not useful. I am using the following things: Ubuntu…
Mitch
  • 1,604
  • 4
  • 20
  • 36
5
votes
2 answers

Performance issue with django exclude

I have a Django 1.8 application, and I am using an MsSQL database, with pyodbc as the db backend (using "django-pyodbc-azure" module). I have the following models: class Branch(models.Model): name = models.CharField(max_length=30) startTime…
Ozgur Akcali
  • 5,264
  • 2
  • 31
  • 49
5
votes
7 answers

Use Django pyodbc SQLSERVER issue

I'm trying to connect django with sqlserver . I already installed python odbc and django-odbc. My data dabase configuration (settings.py) DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', # Add 'postgresql_psycopg2', 'mysql',…
fandreacci
  • 937
  • 2
  • 9
  • 14
4
votes
1 answer

django-pyodbc-azure SQL Server Parameter Limitation

Django: 1.11 I am using django-pyodbc-azure as my Django backend. It is connecting to SQL Server 2012. SQL Server has a limit of 2,100 parameters. When I attempt to use prefetch_related on a queryset that will return more than 2,100 results... def…
4
votes
2 answers

Django-pyodbc SQL Server/freetds server connection problems on linux

Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)') I'm migrating from developing on a windows development machine to Linux machine in production and I'm…
reconbot
  • 5,138
  • 6
  • 45
  • 63
4
votes
1 answer

MS Access backend for django

I've been working on a modification of the django-pyodbc package so that it could be used with MS Access. I need this for a legacy database we are tied to at my organization, and have been doing a rather hacky job specific to my situation, but have…
James
  • 306
  • 3
  • 5
3
votes
2 answers

django-pyodbc-azure 2.1.0.0 not supporting Django 2.1.0

We are trying to connect Django-2.1 with MS SQL Server 2012. We were looking for modules to use for this and stumbled across django-pyodbc-azure. We pip installed it and while restarting the app, we got this following error message: Unhandled…
Kaushik
  • 553
  • 3
  • 11
  • 27
3
votes
2 answers

Django 2.1 SQL Server 17 error - isn't an available database backend. Try using 'django.db.backends.XXX'

django.core.exceptions.ImproperlyConfigured: 'django-pyodbc-azure' isn't an available database backend. Try using 'django.db.backends.XXX', where XXX is one of: 'mysql', 'oracle', 'postgresql', 'sqlite3' I have tried switching to the following…
3
votes
0 answers

django-pyodbc-azure is checking version on every request

Issue on GitHub: https://github.com/michiya/django-pyodbc-azure/issues/80 Every time a request is made, the django-pyodbc-azure backend is checking for the SQL version, resulting in a lot of additional latency: QUERY = "SELECT…
aensm
  • 3,325
  • 9
  • 34
  • 44
1
2 3 4 5 6