I'm curious to know if having a small number of .mdb databases connections open at the same time will tax systems or if it's ok to do assuming they are only open for a brief instant in time.
For applications that briefly open an .mdb file while initializing, I normally try to pass a reference to an instance of CDatabase that has been opened on a database while loading data from tables. I'll usually close the database connection once I know I'm done. The database remains open for less than a second.
I'm now faced with the need to read from multiple .mdb files while initializing, with no guaranteed order, and the potential to need to alternate reads between the databases. I've noticed that there is a big time difference if I close the old database connection and open a new one when I need to switch which database I'm reading from.
My intention is to keep a small array of those open database connections to keep the duration of the loading time to a minimum and close them promptly once I'm done.
Are there any hidden "gotchas" to doing this? Is it unwise to keep more than one instance of a database open at a time?
Well, after benchmarking many combinations using multiple .mdb files, this does not affect performance or memory usage in any significant way.
(For anyone who might stumble upon my question and wonder how this ended up)
You can have one method to read the "raw" data for each data line as long as they follow the same pattern, for example, in your case, it looks like:
<name> <data1> <data2> <data3>
after that, you have to interpret each data like depending on where it comes from, is it from Dow ? is it from "Oil"? and decide if it's a percentage, a absolute value, a "delta" and put those values in the appropriate fields in your application :
Here I am having one main document window which is coming up initially. And I have another 2 dialog window which should be open on keydown event. From main document window I am able to get key down event and functionality working properly. In Those 2 dialog I put same events, and there start my problem. First time when it(dialog) comes up its not catching keydown event. If I close that dialog and then open it again then I am able to catch it. I found on net some where to put below code,