
Updating the database using the DataSet object
I've had that error when I had first filled the dataset -
DataAdapter.Fill(DataSet, "TableName") and then when I did the update I only
put DataAdapter(DataSet), instead of DataAdapter(DataSet, "TableName"). But
that was with ODBC that allowed you not to put the table name in, not sure
if the SQL client allows that overload....
Daniel.
Quote:
> Be sure you are just passing the dataset and not dataset.Table
> Also be sure you set the Commands for SELECT, INSERT, UPDATE, and DELETE.
> You can use the SQL Command Builder Object to do that automatically.
> > Hello
> > I have run into a difficulty using the DataSet object. I'm using Win2k
> > Server with Visual Studio.NET Enterprise Edition Beta 2 and I'm making
an
> > app that allows a user to scroll throught a SQL Server 2000 database and
> > view/create new rows in the table (I'm using the datagrid control).
> > I'm using a DataSet to store the information that is displayed and
> altered,
> > but when I run the DataAdapter.Update method, passing the DataSet as
> > parameter, an System.ArgumentNullException is raised, stating:
> > the value cannot be null
> > Parameter name: Table
> > Can anyone tell me if they have come up with a solution for this ?
> > thx
> > Bruno Valente
> > PS - Sorry for the long post message