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
0
votes
0 answers

Win server connection with SQL server. pypyodbc.DatabaseError: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error')

I tried the below code to connect to SQL Server from Windows 10 and it ran successfully but now I'm trying to run the same code from Windows Server 2016 and it's giving me SSL error. The code: conn = pypyodbc.connect('Driver={SQL Server};' …
Akanksha_p
  • 916
  • 12
  • 20
0
votes
2 answers

Import CSVs into different SQL tables

I have a directory full of CSVs that need to be imported into different tables of a SQL Server database. Fortunately the filename of the appended CSVs starts with the string "Concat_AAAAA_XX..." where the AAAAA part is a alphanumeric string followed…
Gurdish
  • 89
  • 1
  • 7
0
votes
1 answer

How to install pyodbc python library in server?

I have python 3.8 and I am trying to install pyodbc library to connect sql server but getting error. Please help me how to install it? Is there any other library to connect sql server? I am using below command - python3 -m pip install pyodbc Error…
Shivika Patel
  • 213
  • 1
  • 5
  • 14
0
votes
1 answer

Can select COUNT(*) produce the next error?

I am using python's pypyodbc to process some sql BULK insertion cmds on a SQL Sever Database. Yet, at the logs I found: python load_d 4c24-4ea4 ENTER SQLExecDirect HSTMT 0x000000000336C260 UCHAR * …
Jose Cabrera Zuniga
  • 2,348
  • 3
  • 31
  • 56
0
votes
0 answers

Unable to insert data into a remote sql database using flask

I have a code running on server named 'MGSF.xabis.com'. the main function of the code is to insert data to db table. when i give SQL db table of same server it works fine, but when i want to insert data to SQL DB Table of another server with name…
0
votes
0 answers

Invalid Cursor State Python SQL Statement

I am writing a simple python program to retrieve information from a localhost database i set up. I am encountering the following error: ('24000', '[24000] [Microsoft][ODBC Driver 17 for SQL Server]Invalid cursor state') My code: try: …
Geedubs123
  • 69
  • 8
0
votes
0 answers

Python PYODBC executing T-SQL function

I am trying to execute a T-SQL function custom function which returns data, the code runs without error but when I try to print the result it prints only some rows, the function works well on SQL Server. This is the code: import pyodbc import…
0
votes
1 answer

Can't fill rows correctly using for loop during CSV import to SQL Server

I'm trying to import CSV file to SQL Server using Python. However, during last parts of code something is not working as I'd like it to. Every row looks the same after importing it to SQL Server, even though rows in DataFrame are…
0
votes
0 answers

INSERT INTO MS Access with python ans pyodbc.. Error after inserting some rows

I am trying to insert data into ms access I successfully insert some rows and suddenly I get an error. After the error, I can't INSERT more rows. An example: import pyodbc cnxn = pyodbc.connect(your_driver_and_path_to_ms_access) crsr =…
Juan Chamie
  • 61
  • 1
  • 4
0
votes
3 answers

Import pyodbc in Visual Studio Code

I would like to access SQL Data from Visual Studio Code, following this tutorial Access Azure SQL Database from Visual Studio Code using Python it caught an error when I tried to import pyodbc with import pyodbc the error: ModuleNotFoundError …
nilsinelabore
  • 4,143
  • 17
  • 65
  • 122
0
votes
0 answers

Problem with pypyodbc connecting to Advantage Database Server 9.1

I am new to Python (3.8), and we are migrating old programs developed in Visual FoxPro. We must connect to an Advantage Database Server 9.1 database through ODBC. But using the same connection string that works correctly in Fox, using pypyodbc, I…
0
votes
0 answers

Pyodbc Python multiline if record exists update else import

I am very new to Python so hopefully I will provide the info needed to answer the question. I am trying to update/insert records into a newly created database. I have created a connection to the database with no issues, I can even insert records.…
Noah_v
  • 1
  • 1
0
votes
0 answers

"Protocol error in TDS stream" when trying to connect to MySQL server

I am trying to connect with Python to my MySQL server which I run on another PC. The server works fine and I am able to connect to it with HeidiSQL client. But when I try to do it with Python with the following code: import…
Kosh
  • 960
  • 2
  • 13
  • 28
0
votes
0 answers

python insert sql not working when calling through function

I am able to write to the db when connecting outside of the function but unable to write to the database when calling it via the function def Metric_Insert(): cnxn1 =…
RB17
  • 356
  • 1
  • 8
  • 26
0
votes
0 answers

pypyodbc sql query of cloud stored ms access database is slow when querying newest data but fast when querying oldest data

I'm using pypyodbc and pandas.read_sql_query to query a cloud stored MS Access Database .accdb file. def query_data(group_id,dbname = r'\\cloudservername\myfile.accdb',table_names=['ContainerData']): start_time = datetime.now() …
Jamie
  • 11
  • 5