Results 1 to 3 of 3

Thread: Error Trapping

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Posts
    1

    Post

    hi everyone, im pretty stuck.
    I have a project which works off an oracle and access database.
    The problem is that I want to find a way of recording where an error occurred.
    An error could occur:
    1. within VB
    2. within the ODBC Jet Driver for Access
    3. within the ODBC driver for Oracle
    4. within the oracle database
    5. within the access database
    I need to produce a standard error message and write the trapped error details to an error log but I don't know how to always know where the error originated.

    Any help would save my life cos im really stuck

    many thanks in advance


  2. #2
    New Member
    Join Date
    Jun 1999
    Posts
    15

    Post

    Here is the standard error message I use:
    msgbox "Error- " & err.Description & " (" & Err.Number & ")"

    I think the description it provides might give you enough info to figure out where it came from. To log the errors, if you have one central error handling routine that you call when you run into an error that shows any messages you want and then writes that same message (along with other info you might want) to a file.

  3. #3
    Lively Member
    Join Date
    Jun 1999
    Location
    Raleigh, NC
    Posts
    70

    Post

    make sure you consider that ODBC errors from Oracle are cntained in a collection. VB will usually give you a 3146 - ODBC Error (which doesn't help much)... but if you iterate thru Errors() you can get the Oracle error that returned. This is a good reason to have all your data access handled in one place so that you can have a specific error handler for the numerous errors you might get.

    Bash

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