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
2
votes
1 answer

Django With MSSQL using Pyodbc: Model Forms not being saved

Django version 1.8.16 pyodbc Version: 3.0.11b16 I have been trying to make a view/submit form for a project. The basic aim I need to achieve is to view and edit/save the data in the form using stored procedure in MS SQL Server 2014. I am able to…
2
votes
1 answer

django-pyodbc bulk_create is broken

When calling bulk_create() using django-pyodbc backend, an insert statement is run for each object in the batch. The behavior should be to run a single insert statement per batch. Is this a bug, or is there a way to alter this…
aensm
  • 3,325
  • 9
  • 34
  • 44
2
votes
2 answers

DJANGO-PYODBC problems at runserver

i'm testing django project to connect a Sql Server database via ODBC. i have some problems when I try doing runserver of my project the installed components are: python 2.7 django 1.10.2 django-pyodbc 0.4.4 the first error was File…
edoardo
  • 61
  • 4
2
votes
2 answers

FreeTDS: Login failed for user

I'm trying to connect to a MSSQL 2005 server using FreeTDS. But I'm getting the "Login failed for user" error. There is a section on it in the FreeTDS manual trouble shooting section. But it does not mention any possible errors related to it. Can it…
dan-klasson
  • 13,734
  • 14
  • 63
  • 101
1
vote
1 answer

Can't connect django to exist MS SQL Server using mssql-django

I'm getting an error when trying to execute manage.py runserver. I've installed mssql-django and the odbc driver 17 for sql server. I am very new to django and python in general but I want to use exist ms sql server instead of sqlite. this my code…
TienVu
  • 11
  • 2
1
vote
1 answer

Adaptive Server is unavailable or does not exist

I'm trying to connect to mssql server via FreeTDS. First I tried it via ODBC Driver 17 for SQL Server and it works. Here is my configuration in settings.py. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', …
xralf
  • 3,312
  • 45
  • 129
  • 200
1
vote
1 answer

Heroku deployment and pyodbc

Ok so I have been trying for days to deploy on Heroku. I can't even upgrade my account on Heroku to ask the question of how to go about this. I have a fully functioning emulated Django project on my computer. I initially used PythonAnywhere and…
w j
  • 43
  • 1
  • 7
1
vote
3 answers

Using SQL join query with pyodbc mssql django

I am trying to perform some join statements but they are not working. All the examples I see are with php admin. I am using SQL Server. I don't want do do the joins using the the django models, instead I want to use queries to perform the join and…
1
vote
1 answer

Executing custom SQL directly does not work but shows no error

I have a funtion in my views.py that execute a sql query directly in the database, like this cursor.execute("INSERT INTO table1(field1,field2,field3) VALUES(%s,%s,%s)",[value1,value2,value3]) cursor.execute("UPDATE table1 SET…
M. Gar
  • 889
  • 4
  • 16
  • 33
1
vote
0 answers

How can we link third party databases (specifically MS Access) to Django for the inspectdb utility?

I want to just automate model creation and also just double check against my manual models using Django's inspectdb utility. However, the database I want to observe is Microsoft Access and it's not very clear how I can do this properly. There is a…
lcrxdch
  • 11
  • 1
1
vote
1 answer

Why isn't Django connecting to SQL Server 2019?

Please see below screenshots as to existing configuration (password hidden due to security reasons). Databases Screenshot 1 Python Packages The error that is returned when I attempt to run the server is either SQL Server v15 is not supported or…
1
vote
1 answer

django model creation connecting to mssql

I am connecting to a legacy mysql database in cloud using my django project. i need to fetch data and insert data if required in DB table. do i need to write model for the tables which are already present in the db? if so there are 90 plus tables.…
geek
  • 794
  • 3
  • 16
  • 41
1
vote
1 answer

Does Django pyodbc support Nexus DB or is it Database dependent?

I have a project where i need to connect Nexus DB in a Django application. I have tried with Django-pyodbc, DATABASES = { 'default': { 'ENGINE': "django_pyodbc", 'HOST': "nexusdb@xxx.xxx.x.xx", 'USER': "", 'PASSWORD': "", 'NAME':…
Arun Augustine
  • 1,690
  • 1
  • 13
  • 20
1
vote
1 answer

django: The database driver doesn't support modern datatime types

I am trying the connect the MSSQL server and pull the data from the SQL server. I landed on below error. "django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types." Version: Django: 2.2 Python:…
1
vote
2 answers

Django execute stored procedure - different data types, multiple parameters and different columns from model

Here is a list of what works and what doesn't, along with the errors. when trying to send in an decimal/money data type variable. I'm not sure if the issue is with different data types, or that more than 3 arguments are passed in. The first 2…
Loser Coder
  • 2,338
  • 8
  • 42
  • 66