I am using the pyodbc driver to connect to a Microsoft access table using SQL. Does anyone know how I'm going to replace the fields in this table? I have at least about deleting a row and then returning the row, but that will change the primary key due to access to the auto number.
I have this to insert into the Progress table:
cnxn = pyodbc.connect('Driver={Microsoft Access Driver (*.mdb, *.accdb)}; Dbq=C:\\Users\\...............(file location)') cursor = cnxn.cursor() cursor.execute("insert into Progress(CockpitDrill,Mirrors,MoveOff,TurnLeft) values (?,?,?,?)",cockpit,mirrors,moveOff,turnLeft,) cnxn.commit()
So, how to replace these fields. Say I wanted to change CockpitDrill from '2' to '3', (all of them are strings).
Any help would be greatly appreciated.
source share