Updating the database using the DataSet object 
Author Message
 Updating the database using the DataSet object

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



Wed, 03 Mar 2004 01:03:30 GMT  
 Updating the database using the DataSet object
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.


Quote:
> 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



Tue, 09 Mar 2004 01:37:28 GMT  
 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



Tue, 09 Mar 2004 08:10:23 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problem updating a database from a dataset using OLEDB command builder

2. update sybase database using dataset api

3. Grid update sqldataadapter dataset UpdateCommand Object Reference

4. dataset problems - cant update sql after editing dataset

5. updating a dataset to the SQL Database

6. Updating a dataset to a different database

7. Update database from a dataset

8. Updating Database/Dataset

9. Problem with Updating Dataset contents back to db when using data binding

10. dataset not set to an instance of an object when using Server.transfer

11. Dataset changes updates grid , How to update SQL table

12. Error Using DataSet Object

 

 
Powered by phpBB® Forum Software