Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 4 of 4 total |
Trapping Exception Errors |
Mon, May 8 2006 4:17 AM | Permanent Link |
"Robin" | Hi,
I have sucessfully vectored Application.OnException to my Exception handling routine. This works fine and correctly traps all errors within my code. It does not however trap the following error: A form is created, as part of normal startup where A table is open with an invalid (or no) Database name This happens when the Database is located in a seperate DataModule and not yet initialised. Is there a way of trapping this within my exception handling routine ? cheers Robin |
Mon, May 8 2006 1:54 PM | Permanent Link |
Stuart Kelly | Hi Robin,
<< It does not however trap the following error: A form is created, as part of normal startup where A table is open with an invalid (or no) Database name This happens when the Database is located in a seperate DataModule and not yet initialised. >> My guess would be the creation order of the forms. Where do you setup the Application.OnException? Is it on your main form or part of the DataModule? -- Stuart Kelly mode software |
Tue, May 9 2006 1:22 PM | Permanent Link |
To prevent the error in the first place, in the project options, make sure
that the DataModule is earlier in the list of auto-created forms than the main form. --Bill Sparrow-- | |
Wed, May 10 2006 8:26 AM | Permanent Link |
Dan Rootham | Robin,
Bill's advice is correct: << make sure that the DataModule is earlier in the list of auto-created forms than the main form >> One other trap to watch out for is any events on the data module which may fire very early in the app's creation e.g. AfterScroll. You may need a flag to detect when the app has completely initialised and the main form is ready, and until that flag is set True you should skip the code in the AfterScroll or other event. I got bitten by this a while ago, and it caused some puzzling AVs. HTH, Dan Dan Rootham Lexicon Software Ltd, Bath, UK |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |