problem w/ "Object reference not set to an instanc

Results 1 to 2 of 2

Thread: problem w/ "Object reference not set to an instanc

  1. #1
    Join Date
    Dec 1969

    Default problem w/ "Object reference not set to an instanc

    I&#039;m not sure if anybody can help, but I&#039;m desparate.<BR><BR>I have an application that has started to behave in a strange manner. I have a bunch of records in a mysql database. I can see all the records no problem in other utilities and can run queries against them.<BR><BR>However for some (most records) when I run a <BR>SELECT * FROM tblName WHERE loginid=&#039;"+Session["loginID"]+"&#039;;"<BR><BR>and try and store the result in a OdbcDataAdapter and then try and access the data it&#039;s almost as if the object doesn&#039;t exists anymore (hence the error message)<BR><BR>Does anybody know how this can happen? The application was working fine and I was getting data back from the database (I convert a single record into a datarow and read from the datarow). Accessing the datarow gives me the error msg Column &#039;firstname&#039; does not belong to table tblName <BR><BR>Any help is greatly appreciated! Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: problem w/

    the possible causes are:<BR><BR>your Session["loginID"] is null<BR><BR>or your dataAdapter is not initialized, <BR>or your dataset where u r storing the data is not initialized<BR>try it<BR>Mitesh<BR>

Posting Permissions

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