Results 1 to 3 of 3

Thread: Error trapping problem

  1. #1

    Thread Starter
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545

    Error trapping problem

    Hi

    I have made a 'database corruption utility' tool for our customers to use to determine which records in a specific table are corrupted (as happens often with access). My program creates a temporary table in a new database, and copies all data from the source table to the new one. I have included error trapping during the copy table routine, but that does not stop the program from showing the dreaded "___ has encountered a problem and needs to close. We are sorry for the inconvenience." error report dialog box.

    It seems that when reading the corrupted record in the table being searched, the error is not trapped by visual basic and it just crashes.

    Is there ANY way to trap these kinds of errors???

  2. #2
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325
    Uuhmhm... Strange... With the On Error statement you should be able to catch ALL errors... BUT! If you are using some special 3rd part control, maybe you'll not be able to catch that errors... But if you're using "plain" vb you MUST catch.... Try posting the relative code....
    Learn, this is the Keyword...

  3. #3
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Re: Error trapping problem

    Originally posted by ae_jester
    Hi

    I have made a 'database corruption utility' tool for our customers to use to determine which records in a specific table are corrupted (as happens often with access). My program creates a temporary table in a new database, and copies all data from the source table to the new one. I have included error trapping during the copy table routine, but that does not stop the program from showing the dreaded "___ has encountered a problem and needs to close. We are sorry for the inconvenience." error report dialog box.

    It seems that when reading the corrupted record in the table being searched, the error is not trapped by visual basic and it just crashes.

    Is there ANY way to trap these kinds of errors???
    Recordsets (if you are using them) have an Error object collection associated with them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width