Hi All,
I'm trying to use a DataSet to maintain some rows for a table, and when I've finished my changes, send all changes to the database using a SqlDataAdapter.
I find if there are no rows in the table in the database then I am getting a 'Object reference not set to an instance of an object' when I try to access the table in the Dataset.
Is there a way to work with a Dataset like this ie. I start off with an empty table and I wish to add rows, to access the structure of the table rows, build rows, then add them and do the update on the SQLDataAdapter.
Thanks,
Sinead
Here is my code:
protected SqlDataAdapter memberDA = new SqlDataAdapter();
protected DataSet memberDS
{
get
{
if (ViewState["memberDS"] != null)
return (DataSet)ViewState["memberDS"];
else
...
Go to the complete details ...