Questions tagged [pypyodbc]

pypyodbc is a pure Python ODBC interface module. (Not to be confused with pyodbc, which performs many of the same functions but was written as an *extension module* in C++.)

pypyodbc is a pure Python interface module. It is very similar to , which performs many of the same functions but was written as an extension module in C++.

In addition to being a very good ODBC Library in its own right, pypyodbc is a useful alternative to pyodbc in situations where pyodbc encounters difficulties.

For more information, see

pypyodbc - A Pure Python ODBC Library

Installation is available from pip:

pip install pypyodbc

Or by downloading installation package. (Unzip, navigate to folder, and run:)

python setup.py install
285 questions
109
votes
10 answers

Output pyodbc cursor results as python dictionary

How do I serialize pyodbc cursor output (from .fetchone, .fetchmany or .fetchall) as a Python dictionary? I'm using bottlepy and need to return dict so it can return it as JSON.
Foo Stack
  • 2,185
  • 7
  • 24
  • 25
23
votes
2 answers

Pypyodbc: Can't open lib 'FreeTDS' : file not found") error when trying to connect to SQL server

I'm trying to connect to a SQL Server using Pypyodbc on Mac and I'm getting the following error: pypyodbc.DatabaseError: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'FreeTDS' : file not found") I have installed freeTDS and…
Mo.
  • 40,243
  • 37
  • 86
  • 131
18
votes
1 answer

does pyodbc have any design advantages over pypyodbc?

I know pyodbc is an older project and probably more featureful and robust, but is there anything about its design (based on components of compiled C code), that would make it preferable to a pure Python implementation, such as pypyodbc? I do a lot…
Tony
  • 625
  • 1
  • 6
  • 17
15
votes
1 answer

How do I import an .accdb file into Python and use the data?

I am trying to figure out a way to create a program that allows me to find the best combination of data based on several different factors. I have a Microsoft Access file with creature data in it. Attack, Defense, Health, Required Battle skill to…
Justin
  • 155
  • 1
  • 1
  • 6
10
votes
3 answers

Connecting to SQL Server with pypyodbc

I need to send unicode to SQL Server with Python 2.7. I failed with pymssql. I'm now trying to get pypyodbc working (as opposed to pyodbc), as it gives working unicode examples. The problem is that the connection string in the example doesn't…
scharfmn
  • 3,561
  • 7
  • 38
  • 53
8
votes
1 answer

Trying to import pypyodbc module gives error 'ODBC Library is not found. Is LD_LIBRARY_PATH set?'

I am running Python 3.5 on my Linux Mint 18. I want to load the pypyodbc module. However, no matter what I try, I always get the error: OdbcNoLibrary: 'ODBC Library is not found. Is LD_LIBRARY_PATH set?' In Set LD_LIBRARY_PATH before importing in…
fedorqui
  • 275,237
  • 103
  • 548
  • 598
8
votes
3 answers

How to get entire VARCHAR(MAX) column with Python pypyodbc

I have a Python program that connects to an MSSQL database using an ODBC connection. The Python library I'm using is pypyodbc. Here is my setup: Windows 8.1 x64 SQL Server 2014 x64 Python 2.7.9150 PyPyODBC 1.3.3 ODBC Driver: SQL Server Native…
CM-Dev
  • 373
  • 1
  • 5
  • 15
8
votes
2 answers

Python MS Access Database Table Creation From Pandas Dataframe Using SQLAlchemy

I'm trying to create an MS Access database from Python and was wondering if it's possible to create a table directly from a pandas dataframe. I know that I can use pandas dataframe.to_sql() function to successfully write the dataframe to an SQLite…
Radical Edward
  • 5,234
  • 5
  • 21
  • 33
7
votes
2 answers

What's the cause of this UnicodeDecodeError with an nvarchar field using pyodbc and MSSQL?

I can read from a MSSQL database by sending queries in python through pypyodbc. Mostly unicode characters are handled correctly, but I've hit a certain character that causes an error. The field in question is of type nvarchar(50) and begins with…
vowel-house-might
  • 1,686
  • 14
  • 18
7
votes
2 answers

Python / pypyODBC: Row Insert Using String and NULLs

I am pretty new to Python and have not really interacted with SQL Server and XML Parsing until this current project (might not even the best approach to take). Long story short, my IT team is very back-logged and I need to get data into a sandbox…
m3m5rr
  • 125
  • 1
  • 1
  • 7
6
votes
1 answer

What are the advantages and disadvantages of using pypyodbc, pymssql, and pyodbc?

I know that Pypyodbc is the newer version of Pyodbc. A question before asked about the comparison between these two but I want to add Pymssql into the mix.
HamTheBurger
  • 308
  • 1
  • 3
  • 17
6
votes
3 answers

pypyodbc error 'Associated statement is not prepared'

I am trying to create an 'upsert' function for pypyodbc SQL Server. I have validated that the query built up will run in SSMS with the desired outcome, but when trying to execute and commit with pypyodbc I receive the following error: 'HY007',…
Alec Thomas
  • 176
  • 1
  • 2
  • 12
4
votes
1 answer

Is doing asynchronous database calls in a flask application possible?

I am working on a Flask application that interacts with Microsoft SQL server using the pypyodbc library. Several pages require a long database query to load the page. We ran into the problem that while Python is waiting for an answer from the…
Dylan
  • 51
  • 1
  • 5
4
votes
1 answer

Python SQL Single Commit vs Multiple Commit In With

I'm new to Python so I've been hacking together script from what I find and it's been going well (aka my scripts are working even if they're not the most elegant or correct). My ultimate goal is to take a csv, read it, find a phase, and then if that…
Grant
  • 903
  • 1
  • 16
  • 24
4
votes
0 answers

Include ODBC Library in AWS Lambda Python Deployment

I have created a Deployment Package for AWS Lambda, written in Python 2.7. In the Python script, I use pypyodbc to connect to an external data source, using a User DNS that I have configured on my local machine. When I attempt to deploy the package,…
user2752159
  • 1,182
  • 3
  • 13
  • 29
1
2 3
18 19