I am working on a project where I have to keep a MySQL database in sync with an Informix database. The existing Informix database uses 4gl programs to interact with the database. I am able to modify the existing 4gl programs to call python scripts using (MySQLdb) to update MySQL. The problem I am running into is with commits and rollbacks. Since I will need to call python scripts multiple times from different parts of the old 4gl codes. I am wondering if there is a way to use rollbacks. I'm not sure how to reference db_cursors from different instances of python scripts so that I can run rollbacks on the correct set of transactions.
If anyone knows this is possible please let me know.
Thanks,
JD Mackiewicz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am working on a project where I have to keep a MySQL database in sync with an Informix database. The existing Informix database uses 4gl programs to interact with the database. I am able to modify the existing 4gl programs to call python scripts using (MySQLdb) to update MySQL. The problem I am running into is with commits and rollbacks. Since I will need to call python scripts multiple times from different parts of the old 4gl codes. I am wondering if there is a way to use rollbacks. I'm not sure how to reference db_cursors from different instances of python scripts so that I can run rollbacks on the correct set of transactions.
If anyone knows this is possible please let me know.
Thanks,
JD Mackiewicz
rollback() is a connection object method.