
August 2nd, 2012, 02:22 AM
|
|
Contributing User
|
|
Join Date: Jul 2009
Posts: 77
Time spent in forums: 19 h 17 m 50 sec
Reputation Power: 4
|
|
Quote: | Originally Posted by Luthfi I believe the code would be straightforward. No decent approach would become so inefficient compared with the others. However I would like to remind you that OnShow event might be triggered multiple times. Unlike OnCreate. So, if you don't want the code to be executed multiple times, you need a little special care for it.
When you activate the queries and the corresponding database is not found, ADO itself will raise exception. You of course can customize the exception by capturing it and throw your own exception. First you have to find out the ADO's exception class for database missing. For this, just simulate a database missing situation.
Edit:
If you are using multiple TADOQuery (or any ado datasets), and they are connected to the same database, why don't you use a single TAdoConnection to define database connection? |
I will try the adoConnection, and thank you for the help. Will reply if I encounter any problems
|