I have a program that will contain one main form and many children forms attached to it. Before I even get that far as launching the forms I need to have a routine that will verify that it connect to the database. No sense of even displaying a form if I cannot get to the DB. My main form is called frmMain. Should I have a little routine in there to check and verify that I can connect to the DB. If not, show the error message and exit the form and end the program OR should I have another mechanism to check the DB connectivity. If OK, then show the main form.
I have a class module with all of my ADO calls and procedures. I'm just trying to figure out the best place to place this initially so I can make the references to all of these procedures from any form in my app, which I'll have about 20. Just trying to get this ironed out before I continue because I'll be referencing a ton of DB calls from where ever I decide to initially create the class module.
So my question is where should I place the code to access the class - in my main form frmMain or somewhere else like some sort of form that gets launched and then hidden for the remainder of the execution of the program. Just looking for the best way to do this for future projects and the reasons why or why not doing it one way or another.
Thanks in advance.