Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [pyodbc]

pyodbc is a module that allows you to use Python to make a database connection using ODBC

-1 votes
0 answers
52 views

Unable to Locate "Sheet1" in Excel File When Using pyodbc to Insert Data into MS Access

I'm trying to insert data from an Excel file into an MS Access database using pyodbc, but I keep encountering an error stating that "Sheet1" cannot be found in the Excel file. Here's my code:...
Adeel Ahmad's user avatar
0 votes
1 answer
69 views

ODBC Driver 18 for SQL Server: SSL Provider

I'm trying to connect to a remote SQL Server database which is in a Windows Server machine from a Linux arm based server, I'm using Python as programing language and SQLAlchemy and this is the code I'...
Hernandez Sinsel Jesus Emmanue's user avatar
0 votes
1 answer
60 views

ODBC Driver 17 not found in deployed back but works in localhost

I hope I am not repeating a post, I haven't found a solution to my problem yet. I am a junior dev and I am currently trying to push in production a new version of an existing website. I work in python ...
Dev_Yonko's user avatar
0 votes
0 answers
17 views

Does pyodbc version 5.x replace the User and Password keys in the odbc.ini file with uid and pwd?

Host OS: Ubuntu 24.04 Container OS: Ubuntu 22.04 Container Python: Python 3.10 Running inside a virtual environment. PyODBC Version: 5.1 My /etc/odbc.ini configuration is as follows: [ODBC] Trace ...
ybjeon01's user avatar
1 vote
1 answer
47 views

Running an update() with parameters from df.to_dict() causes errors

I am attempting to implement a functionality whereby a table in a SQL Server database is updated as per the contents of a pandas dataframe. I check for overlapping IDs in the database table and in the ...
Malak Khan's user avatar
0 votes
1 answer
35 views

how to pass AAD AccessToken to authenticate SQL Server using aioodbc library?

I'm using aioodbc to connect to Azure SQL Server. I wanted to pass accessToken to authenticate SQL server instead of admin user/pass. I see some links that PyOdbc supports passing accessToken when ...
Shankar's user avatar
  • 8,899
0 votes
0 answers
37 views

ODBC Connection Error in Python Virtual Environment: `Login failed for user 'userx'` (SQL Server)

I'm facing an issue while trying to connect to my SQL Server database using pyodbc and SQLAlchemy in a Python virtual environment on my M1 Mac. The connection works perfectly in my global Python ...
Girijesh Thodupunuri's user avatar
0 votes
2 answers
59 views

Connect to SQL database using windows authentication

I have a SQL database on my computer that I am trying to connect to using python. For starters, when I connected to the database with SQL Server Management Studio, I used the option connect with ...
user25884369's user avatar
0 votes
0 answers
63 views

Pyodbc auto running CREATE PROCEDURE

I am connecting to a SQL Server using pyodbc - nothing fancy. I have been flagged by a DBA that I have long running queries on the DB, however, I know the query I am running takes between 1-3 seconds ...
Dean's user avatar
  • 2,355
0 votes
1 answer
43 views

Infinite loop occurs when a merge statement is entered with pyodbc

I am currently implementing an API using AWS Lambda to insert data into a SQL Server database. I'm using Python 3.11. The code executes successfully and returns a 200 status code, but when I run a ...
강명준's user avatar
0 votes
1 answer
33 views

pyodbc cursor.fetchall() is returning "strange" values

I have a class with multiple functions to handle database operations, one of them is used to run queries (select, update, delete, insert....), but I'm having problems getting the result of my "...
Aldimar J's user avatar
-2 votes
0 answers
47 views

SQL Connection in my FastApi code is intermittent

I have created a Fast API application for my job. This is hosted on a windows server. It's wrapped as a windows service using pyWin32 and runs a FastAPI app using Uvicorn. You can see this below, most ...
Lucas Williamson's user avatar
0 votes
1 answer
72 views

Debugging Pandas to_sql function

I use the following code to insert a DataFrame into an MS SQL Server database. data is a pd.DataFrame that has the same columns as the database. from sqlalchemy import create_engine engine = ...
Ohumeronen's user avatar
  • 1,987
0 votes
0 answers
59 views

RAM buildup after incrementally extracting data, preprocess and fe

I have one year worth of transaction data inside a mssql database and table. I've extracted the table day by day incrementally using pyodbc, then proceed to preprocess the extracted data, and then ...
AIS TESS's user avatar
-1 votes
0 answers
63 views

I have a python script that keeps failing with error [SQL Server]Incorrect syntax near ';'. (102) (SQLExecDirectW)")

The complete error is: An error occurred while executing the script: ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near ';'. (102) (SQLExecDirectW)&...
vivek mishra's user avatar

15 30 50 per page
1
2 3 4 5
259