dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: VB Crash

  1. #1
    Join Date
    May 2002
    Location
    Colombo,Sri Lanka
    Posts
    1,110

    Unhappy VB Crash

    I have a application which show the all the sql server in the network.But SOMETIMES it crashes.After that it exit from the VB also I don't know which function is crashing.

    How can I detect the function.

    I think global error handler would do,
    So can Implement this.

    Thanks in advance

  2. #2
    Join Date
    Aug 2002
    Posts
    174

    On Error Statement

    why don't you find use On Error Statement

    sub ??
    on error goto err
    ---
    --
    --
    --
    err:
    msgbox err.number & err.message
    end sub

    to find the error and fix it...
    SG

  3. #3
    Join Date
    May 2002
    Location
    Colombo,Sri Lanka
    Posts
    1,110
    Yes I did this.But still it is crashing.

  4. #4
    Join Date
    Aug 2002
    Location
    Washington, USA
    Posts
    104
    Yes, it's still going to crash. But now it should give you a message when it does so. If necessary, add similar code to every Sub and Function where you suspect the crash might be happening. Include information as to which Sub or Function is current in each call to MsgBox.
    - Shawn
    MCP, VB6: Desktop Apps
    [ C# | VB | .NET | Java | VC++ | Perl | PHP | Javascript ]
    Unless otherwise stated, all sample code provided is UNTESTED.
    http://www.codemastershawn.com

  5. #5
    Join Date
    Sep 2001
    Posts
    254

    trap the crash

    its a little time consuming but it help me a lot.
    in every function il will place a error handler i.e

    on error tellMeWhichOne


    tellmewhichOne :
    msgbox "this fkng Function crash : " &" functionaname"


    hope this help

  6. #6
    Join Date
    Aug 2002
    Posts
    174
    Good Proceed
    SG

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)