CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2001
    Location
    Salt Lake City, UT
    Posts
    135

    How do I suppress further database error messages...

    I have an adodc control with an 'error' event handler (basically just a message box with the error specifics). once my event handler is complete however, I get a standard error message ( i guess generated by VB or the ODBC driver)
    Is there a way to suppress this additional message box?

    Thanks,

    ~goddess
    [email protected]
    "There are no stupid questions, but there are a lot of inquisitive idiots."

  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: How do I suppress further database error messages...

    DId you try On Error Goto 0 ?

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Apr 2001
    Location
    Salt Lake City, UT
    Posts
    135

    Re: How do I suppress further database error messages...

    where would i put it? in the module with my custom error message or in the adodc control's error event?

    ~goddess
    [email protected]
    "There are no stupid questions, but there are a lot of inquisitive idiots."

  4. #4
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: How do I suppress further database error messages...

    On ending the error handler routine, you should let vb leave it with a Resume instruction:
    on error goto myErrHanlder
    ....
    Exit_From_Here:
    ...
    exit sub
    myErrHanlder:
    'do the stuff...
    ...
    Resume Exit_From_Here
    end sub

    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Micahel
    and all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

    The Rater
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  5. #5
    Join Date
    Aug 2001
    Posts
    26

    Re: How do I suppress further database error messages...

    first time when you get the error please debug and in debug mode type err.number then you get the error number in code write "on error goto xxx"

    and in xxx portion you write the code what the system should do if this problem is occured either you reconnect your connect of you simply exit out of the system.

    you can also use on error resume next state ment which will discard all teh error messages occured.


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

Featured