Menu

querying a database

Help
Carla Chua
2011-02-06
2012-09-19
  • Carla Chua

    Carla Chua - 2011-02-06

    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.

     
  • Carla Chua

    Carla Chua - 2011-02-06

    Nevermind this. I just need to close the connection for every transaction. :)

     
  • Carla Chua

    Carla Chua - 2011-02-07

    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.

     
  • Andy Dustman

    Andy Dustman - 2011-02-07

    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.

     
  • Carla Chua

    Carla Chua - 2011-02-07

    Oh. I see. I'll try them out. Thank you very much. :D

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.