Hello. I am creating a program that needs access to a mysql database.
I have noticed that changes done from different modules on the same database
doesn't reflect on the other modules that i've created.
And when I worked on MySQL Workbench to delete and add data, the changes were
not reflected on my program when I tried to select some data from the
database. It will only reflect when I restart my program. However, if i did
the changes in the database through my program, these changes are reflected.
Can anyone give me tips on how to go around this problem? Because my GUI is
not the only program that changes the data in the database but there's also
this other program that is written in another language.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am already have commit and rollback in my transactions that needs inserting,
updating and deleting.
I guess it has something to do with the structure of the database. (?)
Frankly, I'm not so sure since this is my first time integrating a database in
my program. But so far, closing the connection after each transaction seems to
work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Select also causes an implicit transaction to start, so if you are
periodically doing a select to see if new data appears, you should rollback if
you decide there's nothing to do. This is just how transactions work when you
have repeatable reads.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello. I am creating a program that needs access to a mysql database.
I have noticed that changes done from different modules on the same database
doesn't reflect on the other modules that i've created.
And when I worked on MySQL Workbench to delete and add data, the changes were
not reflected on my program when I tried to select some data from the
database. It will only reflect when I restart my program. However, if i did
the changes in the database through my program, these changes are reflected.
Can anyone give me tips on how to go around this problem? Because my GUI is
not the only program that changes the data in the database but there's also
this other program that is written in another language.
Nevermind this. I just need to close the connection for every transaction. :)
No you don't. Try doing a commit or rollback.
http://ronaldbradford.com/blog/understanding-mysql-innodb-transaction-
isolation-2009-09-24/
I am already have commit and rollback in my transactions that needs inserting,
updating and deleting.
I guess it has something to do with the structure of the database. (?)
Frankly, I'm not so sure since this is my first time integrating a database in
my program. But so far, closing the connection after each transaction seems to
work.
Select also causes an implicit transaction to start, so if you are
periodically doing a select to see if new data appears, you should rollback if
you decide there's nothing to do. This is just how transactions work when you
have repeatable reads.
Oh. I see. I'll try them out. Thank you very much. :D