I am thinking of the client PC here. When someone comes to run my app, they may not have the MySql Connector/ODBC installed.
Now, I could just try to connect the information scheme (or mysql) database (which is preferable?) – but, if that fails, it might only mean that the database server is down. I could ping it, but it might be up and the MySql process not currently running.
I guess I could just install the connector anyway, even though it sounds sloppy, but not if doing so is going to noticably slow my app’s start-up time.
What is the best approach?
When I do install, how do I do that from Delphi, given that the connector will be available on the d/b server, who’s IP address is know?
Or … at the moment my app is a simple .EXE, with no installer. Should I create an install which also installs the ODBC connector? (if so, can anyone recommend a good freeware install builder (with no adware or toolbar installs)?
I hope that this is clear. Please ask me if not.
Thanks.
To check the ODB drivers installed you must check this windows registry key
from there you can easily write a delphi function to detect if the MySQL ODBC driver is installed
To install you have several options one can be use
inno setup(which can read the windows registry as well to check for the odbc driver) and then install the driver included inside of your setup file. also you can donwload the driver directly from your app using a simple HTTP GET passing one the download address located here