Jump to content

Null Reference Exception generation in using database connectivity

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
devasheesh

devasheesh

    Newbie

  • Members
  • Pip
  • 1 posts
DataRow d1 =ds1.Tables["User"].NewRow();

Here ds1 is the data se and, "User" is the table in context ...

The above written code is generating a Null Reference Exception during execution need help please....

#2
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
well did u debug to see if Tables["User"] has any columns or Rows , If nothing is present then this is the cause of the Null Reference as ASP.NEt does not allow inserting new row into a Empty Table.