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
1
vote
1 answer

Nested for loop with cursors only gets the first desired result on python

I have the following piece of code I've been working on and I can only get to do the trick for the first row of the "input" table. I know there is clearly no relation between the two cursors on the nested loop but I have tried a nested while-for…
Maik
  • 13
  • 4
1
vote
1 answer

How do I make Python 3.4 c_char_array read strings as two bytes?

I'm using pypyodbc with Python 3.4 on Ubuntu 12.04. I'm trying to get the column names, but something is a little wonky. What is coming back is just the first character as a byte, like this: (Pdb) Cname.value b'T' The thing behind the scenes is a…
Wayne Werner
  • 49,299
  • 29
  • 200
  • 290
1
vote
1 answer

Running multiple stored procedures using pypyodbc giving incomplete results

I'm running a relatively simple python script that is meant to read a text file that has a series of stored procedures - one per line. The script should run the stored procedure on the first line, move to the second line, run the stored procedure on…
user891876
  • 503
  • 1
  • 5
  • 16
1
vote
1 answer

Python pyodbc: encoding of the connection string (Windows)

I have a problem connecting to a local Access file that has accented characters in both the path and file name. I am new to Python, so this is what I have managed so far: # coding=utf-8 from __future__ import absolute_import, division,…
Michal Kaut
  • 1,421
  • 1
  • 14
  • 25
1
vote
1 answer

Cannot execute select using pyodbc with Python 3.3.2

I am developing a data syncing script for a project using python 3.3.2 and pyodbc. The data that I need is coming from a sql server 2008 instance, but so far I have not been able to make any queries successfully. I am able to establish a connection…
0
votes
1 answer

Can't edit or delete rows from SQL database with Python 3.11 and pypyodbc

I am using python 3.11, tkinter, and Pypyodbc 1.3.6 to interact with sql. I can enter new rows >and read existing rows, but I can't delete or edit rows within the database. I don't believe it >is pypyodbc because I was able to delete rows in…
Jim Mehus
  • 1
  • 1
0
votes
0 answers

PyPyODBC return wrong value when empty field

I am using PyPyODBC to retrieve information from a HFSQL Database using the driver carring the same name. If I retrieve two rows and one of them is composed of empty value, it will return the value from the previous row. import pypyodbc cnx =…
Rom D
  • 3
  • 2
0
votes
0 answers

Failing to unixodbc with pip

I am trying to connect to MSSQM server from my python 3.9 application. I was able to install pyodbc but when i try to run pipenv install unixodbc it fails with the following error. (src) root@16cb00f4b680:/workspaces/python-lambda/src# pipenv…
Murphie
  • 29
  • 3
0
votes
0 answers

why use aioodbc over pyodbc and asyncio?

am new to python programming and am currently learning about asynchronus programming using asyncio. I used asyncio to asynchronously read data from a sql server database , and it works fine. My problem is while i was learning to do this i came…
0
votes
0 answers

Why is my python program using pypyodbc hanging and then fails when closing the connection to a .mdb database?

I'm working on building a python code that cleans and organizes data from an mdb database using pypyodbc. Everything was working fine until abruptly a previous function stopped working. I norrowed the problem down to this function, and when i run…
Isaac
  • 1
  • 1
0
votes
1 answer

Flask pyodbc showing "Login failed for user" when using "TRUSTED_CONNECTION=Yes"

I have the following connection: cnxn = pyodbc.connect("DRIVER={SQL Server};SERVER=nameofmyserver;DATABASE=nameofmydb;TRUSTED_CONNECTION=Yes;") The Flask app is on IIS and has Windows Authentication enabled. On one route, I return…
0
votes
0 answers

How to prevent kivy apk from crashing upon launch

I am new to Kivy and have created a basic app using it as well as KivyMD. I used a microsoft SQL database and used pypyodbc to integrate it. I used buildozer to create an apk for the app and all downloaded ok. Upon opening, the app just crashes. I…
Eps4
  • 1
0
votes
0 answers

Not able to connect MSSQL server from Python using pyodbc (while jaydebeapi works fine)

I am trying to connect to MSSQL server using Pyodbc. connStr = "DRIVER={{ODBC Driver 17 for SQL Server}};SERVER={0};UID={1}/{2};PWD={3};Trusted_Connection=no".format("host,port", "mydomain_name", "myuser", "mypassword") pyodbc.connect(connStr) The…
Fahad
  • 1
  • 3
0
votes
0 answers

Anyone know why this error comes up when trying to connect python to sql server with pypyodbc

Error message: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified') task is terminated import sys import pandas as pd from faker import Faker from collections import defaultdict import…
0
votes
0 answers

Error [HY024] [Microsoft][ODBC Driver 17 for SQL Server]Invalid attribute value

I have the error 'HY024 [Microsoft][ODBC Driver 17 for SQL Server]Invalid attribute value. I need to fix it and the database has the compatibility 'SQL Server 2017', I can't figure out why it doesn't work. When doing a 'SELECT @@VERSION' inside the…