zeeshan_khan 0 Newbie Poster

Hi,
I want to know what is the earliest time to initiate a database connection while loading an application.
The problem is that if i write the db connection initialization code in the MDI form Load event, it throws an exception. However, if i write the same code in the Load event of another form (which is loaded later), it works correctly.
Thanks n regards,
Zee