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

Memory error loading a 1GB .accdb using pypyodbc and pandas

I'm trying to do something that maybe is not possible or maybe should be done in a different way... I have to read a 1 GB Access file and manipulate it in pandas; since cursor.fetchall() failed directly with Memory Error, I tried the function below…
DPColombotto
  • 159
  • 1
  • 3
  • 11
1
vote
1 answer

CREATE TABLE with DECIMAL column using Access ODBC

I am using pypyodbc module to create a database and add a table in it. The code I use is the following: import pypyodbc pypyodbc.win_create_mdb('D:\\test.mdb') connection_string = 'Driver={Microsoft Access Driver…
Panos
  • 91
  • 1
  • 9
1
vote
1 answer

pypyodbc update number type field

I have used the script below to successfully update fields in an Access .mdb database that are text fields. I am trying to update a number type field but am getting errors. import csv, pypyodbc conn=pypyodbc.connect('Driver={Microsoft Access Driver…
user3579106
  • 251
  • 1
  • 2
  • 9
1
vote
0 answers

python not correctly save data if I use pypyodbc

I wrote a simple script for parsing csv and insert data into SQL Server. So, the very strange issue is that some variables are lost if I call them in a if condition. This is the script: # DB connection conn = pypyodbc.connect('DRIVER={SQL…
bit
  • 427
  • 1
  • 6
  • 14
1
vote
1 answer

Python Encoding NLTK - 'charmap' codec can't encode character

import pypyodbc from pypyodbc import * import nltk from nltk import * import csv import sys import codecs import re #connect to the database conn = pypyodbc.connect('Driver={Microsoft Access Driver (*.Mdb)};\ …
1
vote
2 answers

Can anyone explain the following stack trace, in step by step, please?

Can anyone explain the following stack trace, in step by step, please? I want to find out what the root cause of the error is and where the error originates from. Traceback (most recent call last): 1. File "C:\Program Files (x86)\Microsoft Visual…
Newbie
  • 95
  • 9
1
vote
0 answers

I get 'pypyodbc.DatabaseError' repeatedly

I have two .py files File_1 contains the following statements: try: conStr4SQLserver = pypyodbc.connect('DRIVER={SQL Server};' 'SERVER=........' …
Newbie
  • 95
  • 9
1
vote
1 answer

Pickle and pypyodbc cursor

I would like to serialize results of the query. Here is my example: import pypyodbc import pickle connection_string ='Driver={SQL Server Native Client 11.0};Server=localhost;' \ …
user1700890
  • 7,144
  • 18
  • 87
  • 183
1
vote
1 answer

Pypyodbc: return field description of specific field in specific MS Access table?

I'm trying to retrieve description (or other property) of field in MS Access database. Something like in recordset of VBA: For Each Field In Recordset.Fields Debug.Print "Name: " & Field.Name Debug.Print "Type: " & Field.Type Debug.Print…
Peter Majko
  • 1,241
  • 11
  • 22
1
vote
1 answer

Create SQL Server temporary tables inside Python script

I'm using pypyodbc to connect to the SQL Server. I want to store my resultset into a temporary table like we do in SQL. But everytime I try to do it - I get this error message: pypyodbc.ProgrammingError: ('24000', '[24000] [Microsoft][ODBC SQL …
90abyss
  • 7,037
  • 19
  • 63
  • 94
1
vote
0 answers

Connecting to an .accdb in Python and reading a table through pandas

I am just trying to connect to an .accdb and read in an existing table. I am using pypypodbc to connect: import pandas as pd import pypyodbc conn = pypyodbc.connect( r"Driver={Microsoft Access Driver (*.mdb, *.accdb)};" …
Gman
  • 134
  • 2
  • 9
1
vote
1 answer

Pypyodbc.DataError trouble with database

I am trying to figure out why doesn't my test programme in python work. I can access the database just fine from MySql Workbench, and I think I did everything right with the programming part, I also went to Administrative Tools and added my database…
Clutchy
  • 252
  • 1
  • 3
  • 15
1
vote
0 answers

Pypyodbc with oracle 11gR2 throwing SQL_INVALID_HANDLE

I'm using pypyodbc-1.3.3 to connect to oracle DB. I'm doing pypyodbc.connect('Driver={Oracle in OraClient11g_home1}; DBQ=TNSNAME; uid=TESTUSER; pwd=TESTP;') I'm getting pypyodbc.ProgrammingError: ('', 'SQL_INVALID_HANDLE') I'm not able to resolve…
ramgo
  • 184
  • 1
  • 3
  • 10
1
vote
2 answers

Does dictionary in python allow duplication?

Given this list of tuples: lists = [('the', 'DT'), ('cat', 'NN'), ('drink', 'NN'), ('the', 'DT'), ('soup', 'NN')] where the, DT NN NN DT NN are the part-of-speech tag of each words, I convert the lists into dictionary: my_dict = dict(lists) It…
user4501264
1
vote
0 answers

error of accessing IBM netezza SQL server from pypyodbc on win7

I need to access IBM netezza SQL database from python on win 7. I have installed Eclipse and python 3.2, pydev, and pypyodbc (https://pypi.python.org/pypi/pypyodbc/1.3.3). It worked well for MS SQL server. But, it got error for IBM netezza. …
user3601704
  • 753
  • 1
  • 14
  • 46