Kevin,
Connecting to the data source should be done every time you wish to select, insert, update, or delete data. As much as possible, a connection should not be established at startup and kept active all through the life of your application.
Martin
Shit happens!!!