I'm using c++ builder and Devart MyDAC components to access a MySQL form database called Formbook. I want to have two seperate programmes running.
Prog 1 will be retreiving a list of my latest odds from Formbook, placing bets through the API and updating Formbook with bets placed so far and P/L figures for each runner.
Prog 2 will allow me to browse through Formbook, view P/L figures for any race, tweak odds for any race as well as update a Formbook table that will be accessed by Prog 1 to receive messages (e.g. suspend betting).
Is it as simple as setting up a TMyConnection to Formbook in each programme? The two programmes will obviously be using the database at the same time so does the MySQL server take care of everything for me or is there anything specific I've got to do within C++ Builder.
locking will dealt with by mySQL so your updates from the two different programs will be serialised. readig is obviously not a problem.
you probably need to have a think about the impact of concurrent updates though from the data point of view though.
locking will dealt with by mySQL so your updates from the two different programs will be serialised. readig is obviously not a problem.you probably need to have a think about the impact of concurrent updates though from the data point of view though.
Thanks DStyle. I'm not sure what you mean in your last sentence. The odds aren't going to change by that much and Prog 1 would only be betting where there was room for error in the odds so I wouldn't have a problem with it working with out of date odds. Where the changes were going to be significant I'd suspend betting on that race until I'd changed the odds. Is that the kind of thing you're meaning?
Thanks DStyle. I'm not sure what you mean in your last sentence. The odds aren't going to change by that much and Prog 1 would only be betting where there was room for error in the odds so I wouldn't have a problem with it working with out of date od
what i meant, without going into the detail of precisely how your program will work, is if you have two things writing to the same row, you need to think about whether there are any dependencies or not. for example, if prog A writes X to row 1, should any more updates be permitted from any other program. generally it means you might need to start querying data immediately before conditionally updating.
what i meant, without going into the detail of precisely how your program will work, is if you have two things writing to the same row, you need to think about whether there are any dependencies or not. for example, if prog A writes X to row 1, shoul
I can't think of any problems DStyle. The two progs will be writing to the same table (although I could make it otherwise) but each will be writing to a separate group of fields with neither group dependent on the other. Thanks for your help.
I can't think of any problems DStyle. The two progs will be writing to the same table (although I could make it otherwise) but each will be writing to a separate group of fields with neither group dependent on the other. Thanks for your help.