Category : odbc

Everything was working until I restarted my laptop. I have this setup: python 3.8.9 django 3.1.1 pyodbc 4.0.30 pyodbc.drivers() shows this: [‘ODBC Driver 17 for SQL Server’] SQLServer openssl version shows this: OpenSSL 1.1.1l 24 Aug 2021 isql -v -k "DRIVER=ODBC Driver 17 for SQL Server;SERVER=<my server>,<my port>;UID=<my username>;PWD=<my password>" connects to the database with ..

Read more

While trying to execute this python part of the script: df.to_sql( name=’my_table_name’, con=<my_connection_engine>, schema=’my_db’, if_exists=’replace’, index=False ) I always receive this error in the terminal where I started my script: Abort trap: 6 and this error in a pop-up window: Process: Python [14664] Path: /usr/local/Cellar/[email protected]/3.8.12/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 3.8.12 (3.8.12) Code Type: X86-64 (Native) Parent ..

Read more

So this is kind of a known issue, but I’m not quite sure I understand exactly how to fix it/if there are any caveats specific to my issue. This is the thread where the issue comes up and has a solution, but I would like a little more help/elaboration, if possible please: "General error Unable ..

Read more

I have been working on to sort the below issue. This gets me the error name ‘odbc’ is not defined I have installed pyodbc library. but the error still happens. try: conn = odbc.connect(connection_string(DRIVER, SERVER_NAME, DATABASE_NAME)) except odbc.DatabaseError as e: print(‘Database Error:’) print(str(e.value[1])) except odbc.Error as e: print(‘Connection Error:’) print(str(e.value[1])) can anyone give me a ..

Read more

Hello I am trying to use I series driver with pyodbc using unixODBC driver and i am having issues connecting (‘01000’, "[01000] [unixODBC][Driver Manager]Can’t open lib ‘IBM i Access ODBC Driver 64-bit’ : file not found (0) (SQLDriverConnect)") None avail = pyodbc.drivers() print (avail) drivers = [item for item in pyodbc.drivers()] driver = drivers[-1] sys ..

Read more

import pyodbc as odbc Driver = ‘SQL Server’ server_name = ” database_name = ” conn = odbc.connect(f""" Driver={{{Driver}}}; Server={server_name}; Database={database_name}; UID=; PWD=; """) def sku_search(): SKU_check = ”’SELECT [ITEMSKU] FROM [StilettoXT].[dbo].[PRODDETAIL] WHERE ITEMSKU = (?)”’ SKU_code = input(‘Please enter the SKU code: ‘) cursor = conn.cursor() cursor.execute(SKU_check, SKU_code) if cursor.fetchall() == []: print(‘Not Found’) elif ..

Read more

I’m trying to connect to SQL server using pypydobc but there is this exception coming pypyodbc.OperationalError: (‘01000’, "[01000] [unixODBC][Driver Manager]Can’t open lib ‘ODBC Driver for SQL Server’ : file not found") . Usage in code : conn = pypyodbc.connect(‘Driver={ODBC Driver for SQL Server};’ ‘Server=server_name;’ ‘Database=db_name;’ ‘Trusted_Connection=yes;’) Upon reading solutions to similar questions, I checked configuration ..

Read more