Writing to Access Linked Tables (SharePoint lists)

I inherited my first Python process from someone who left the company. Since I already had and use Alteryx, I set Alteryx up to run the code (was quicker and easier that getting Py set up on my machine…at least for now)

The code pulls from an Oracle databased, does some manipulation, and then writes out to an Access database.

In trouble shooting the process, the Py code works fine and will write to any table I changed from a Linked table back to a local table, appending to table for any new records as expected. But, it will not work when trying to connect to a linked table.

The process really needs to write/append to the linked tables so the process is seamless over to SharePoint.

Here is a typical error. In this case, “Alan Pannini” is a table having all the records for Alan (there are about 100 such tables):

ProgrammingError: (‘42S02’, “[42S02] [Microsoft][ODBC Microsoft Access Driver] The Microsoft Access database engine could not find the object ‘Alan Pennini’. Make sure the object exists and that you spell its name and the path name correctly. If ‘Alan Pennini’ is not a local object, check your network connection or contact the server administrator. (-1305) (SQLExecDirectW)”)

I really need to be able to have the same writing capabilities to a linked Access table as a local one. The person who originally did this process apparently had no issues…???..

Here is the code that establishes the link to the access. I can post the whole code, if that would help

(the Oracle connection listed works just fine, but I included it for context)

dsn_tns = cx_Oracle.makedsn(dsn_tns_path, 1521, dsn_tns_db)
ora_conn = cx_Oracle.connect(ora_user, ora_pass, dsn_tns)
print(‘Access Connection Attempt’)
conn = pyodbc.connect(
r’Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\Users\myname\OneDrive\UW\SP Linking\MentorLogs - UpdateLandingLinktoSP - Copy.accdb;’)