lolwtf 0 Light Poster

I use an ODBC connection through a dsn, and I was wondering what would be the best way to handle some exceptions. There are two things that I need to catch:

1. If user cannot connect to data base due to network down.

2. If user loses connectivity during use.

My code looks something like this:

try
DBALog.fill(DSSOffice)
catch ex as odbc.odbcexception
Messagebox.show("Could not connect to database")
end

end try

I unplugged my ethernet cable, and ran it for a test. Now that works fine, but the problem is that it takes a good 36 seconds before my message box pops up alerting the user. Is there some way i could speed that up? Maybe within the first 5 seconds?

Thanks