I have an application built in debug mode(VC++ 5.0). It executes fine when run through the debugger. But when i run it outside the debugger i get an access violation error in ODBC32.DLL. The same happens when i run the release version of the application.

How to debug this ???

I have all the necessary exceptions catched in my application.