question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

django-pyodbc and DBISAM ODBC driver

See original GitHub issue

I am working to get a Django project to talk with a DBISAM 4.21 database using the pyodbc and django-pyodbc software and can find little to nothing about how to make this work. It seems to me that DBISAM is a relatively obscure proprietary database server software based on SQL-92 standards. It is not listed as supported by pyodbc at this time but after opening an issue with them in their Git repo I’m able to initiate a connection with a DSN from within the Python shell:

pyodbc.connect(r'DSN=DSNname;UID=User;PWD=Password’)

The company that makes the software (Elevate Software) claims on their website that they support connections from non Delphi based projects using their provided ODBC driver (http://www.elevatesoft.com/products?action=order&category=dbisam&type=other).

I’m trying to use the DBISAM 4.21 database because I am working on interfacing an existing software written in Delphi that stores it’s data in the DBISAM database with a new Python 3 + Django 1.10 based software that is yet to be written.

We have a test environment with Windows 2012 R2 running the DBISAM server software. It has the ODBC driver from the vendor installed along with the vendors Delphi based application. We have also loaded Python 3.6 along with Django 1.10.5 so we can try and get a connection working.

I am completely new to the world of DBISAM database technology AND completely new to the Python ODBC world so let me know if I can offer more details on anything to help the process.

When I load the following configuration into my settings.py file in Django as such:

DATABASES = { ‘default’: { # ‘ENGINE’: ‘django.db.backends.sqlite3’, # ‘NAME’: os.path.join(BASE_DIR, ‘db.sqlite3’), ‘ENGINE’: ‘django_pyodbc’, ‘DSN’: ‘DSNname’, ‘USER’: ‘username’, ‘PASSWORD’: ‘password’, ‘NAME’: ‘databasename’, ‘OPTIONS’: { ‘host_is_server’: True }, } }

I get the following output

pyodbc.Error: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect)')

I am wondering if anyone could offer any thoughts to help me get this connected?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
laneccommented, Sep 18, 2021

I don’t think it has CLI support. Probably faster and easier to use robotic process automation to create an API that can control the windows interface.

1reaction
laneccommented, Sep 18, 2021

@venezianluis instead of messing with this you might be better off using a conversion tool. We had a DBISAM database (Borland Database Engine / SQL-92 / Elevatesoft) that was easily convertible to CSV using this tool: http://www.scalabium.com/dbisam/

I ended up going that route despite getting the database talking to Django with the PyODBC driver. I figured it was better to create new models anyway and easier to pull the data into the new models from CSV than trying to work off the antique database tech we were interfacing with.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting ODBC error in remote server, but localhost works
That error indicates that the driver you've listed can't be found on the server. So install the driver on the target server.
Read more >
Connection Strings - Using the ODBC Driver - Elevate Software
This string value specifies the service name of the remote DBISAM database server that you are accessing. Either the RemoteService or RemotePort ...
Read more >
4.3. Databases and database drivers - CRATE - Read the Docs
For SQL Server: with Django use django-mssql-backend, and with SQLAlchemy use pyodbc, both via ODBC. For the ODBC drivers: under Windows, use native...
Read more >
django-pyodbc - PyPI
Django 1.5-1.10 SQL Server backend using pyodbc. ... Indicates if pyodbc should direct the the ODBC driver to activate the autocommit feature.
Read more >
top5relatedtags - Stack Exchange Data Explorer
... 'iui', 'test-project', 'contactus', 'wbxml', 'odbc-sql-server-driver', ... 'js-data-angular', 'django-pyodbc-azure', 'clickablespan', ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found