Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. very Urgent!.........

very Urgent!.........

Scheduled Pinned Locked Moved ASP.NET
databasehelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    peter rankel
    wrote on last edited by
    #1

    hi all, when i am connecting to the database the following error occured. "System.NullReferenceException: Object reference not set to an instance of an object." and the line where the error occured is "DataSet objDataSet=(DataSet)Session["DS"];" thanx......... your peter

    H I V 3 Replies Last reply
    0
    • P peter rankel

      hi all, when i am connecting to the database the following error occured. "System.NullReferenceException: Object reference not set to an instance of an object." and the line where the error occured is "DataSet objDataSet=(DataSet)Session["DS"];" thanx......... your peter

      H Offline
      H Offline
      HimaBindu Vejella
      wrote on last edited by
      #2

      Where did u create Session["DS"] I think session is null here hence the error "Aim to go where U have never been B4 and Strive to achieve it" http://groups.yahoo.com/subscribe/dotnetforfreshers http://himabinduvejella.blogspot.com

      1 Reply Last reply
      0
      • P peter rankel

        hi all, when i am connecting to the database the following error occured. "System.NullReferenceException: Object reference not set to an instance of an object." and the line where the error occured is "DataSet objDataSet=(DataSet)Session["DS"];" thanx......... your peter

        I Offline
        I Offline
        Ista
        wrote on last edited by
        #3

        peter rankel wrote:

        DataSet objDataSet=(DataSet)Session["DS"]

        should be DataSet objDataSet = Session["DS"] as DataSet; if( objDataSet == null ) { ... error the dataset was not created properly ... } 1 line of code equals many bugs. So don't write any!!

        1 Reply Last reply
        0
        • P peter rankel

          hi all, when i am connecting to the database the following error occured. "System.NullReferenceException: Object reference not set to an instance of an object." and the line where the error occured is "DataSet objDataSet=(DataSet)Session["DS"];" thanx......... your peter

          V Offline
          V Offline
          Vasudevan Deepak Kumar
          wrote on last edited by
          #4

          Session["DS"] has got expired. Modify the code as DataSet objDataSet =new DataSet(); if (Session["DS"] != null) objDataSet = (DataSet)Session["DS"] Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://www.dotnetjunkies.com/weblog/deepak/
          http://deepakvasudevan.blogspot.com/
          http://deepak.blogdrive.com/

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups