Results 1 to 3 of 3
  1. #1
    nvrwrkn is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2012
    Posts
    35

    How to catch oracle exception error

    Got an oracle connect string tied to a form with user & pass. Works fine with correct credentials but with incorrect creds the code stops and shows the debug error of invald user/pass.



    Trying to catch the error before the debugger comes up but nothing after the connection runs because if the connection can't be made the debugger starts and won't hit the errhandler code.

    How can I get connect errors trapped and gotod? In other words, how can I look for this error and take it before the debugger?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Code:
    ON ERROR GOT ERRHANDLER 'at the beginning of your code'
    
    'the rest of your code here
    
    'this would be the at the very end of the code on your button
    ERRHANDLER:
     debug.print err.number & " " & err.description
    If err.number = 0000 'insert the error number you're getting in the debug statement here
       msgbox "OMG PICK A REAL NAME AND PW"
    else
       'remaining error handling steps
    endif

  3. #3
    nvrwrkn is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2012
    Posts
    35
    right.... gottit working now. Thanks sir!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Application.FollowHyperlink throwing Exception
    By Mnelson in forum Programming
    Replies: 4
    Last Post: 03-19-2015, 02:13 PM
  2. Replies: 3
    Last Post: 11-21-2011, 04:38 PM
  3. Exception in unique field
    By neo651 in forum Access
    Replies: 2
    Last Post: 07-01-2011, 02:23 PM
  4. Exception Reporting - Continued
    By shexe in forum Queries
    Replies: 11
    Last Post: 09-20-2010, 11:20 AM
  5. Exception Reporting
    By shexe in forum Queries
    Replies: 16
    Last Post: 09-09-2010, 09:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums