VB.net 2003 " System.NullReference Exception "

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ganeshvkl
    New Member
    • Jul 2008
    • 50

    VB.net 2003 " System.NullReference Exception "

    i got error " An unhandled exception of type 'System.NullRef erenceException ' occurred in system.data.dll " when i run my VB.net 2003 with Sqlserver 2000 server program , the same program is working fine in Other PCs ..

    can someone give solve my Problem?

    Thanx in Adv
    Regards
    ganesh
  • jhaxo
    New Member
    • Dec 2007
    • 57

    #2
    null reference exception meansyou are most likely trying to access a member or method of a null object.

    Maybe you can use try - catch blocks in your code and log the error. there is not enough information here to debug your code.

    try
    {
    }
    catch(Exception ex)
    {
    log(ex.toString ());//write a logging message or even just pop up a message box.
    this should give you the line number where the exception was thrown and then you can more easily find your null object.
    }

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      Step through the program and find the exact line that throws the null reference exception.
      Then come back and post the bits of related code, noting which line caused the error. We might be able to pick out more from seeing that.

      Comment

      Working...