|As Jinwah was getting at, see the
System.Data.DataSet class documentation in the .NET Framework SDK, as well as
System.Data.Common.DbDataAdapter - specifically, one of its derived classes depending on what database you're accessing (like
System.Data.SqlClient.SqlDataAdapter for a SQL Server database).
You give the
DbDataAdapter the appropriate SELECT, INSERT, UPDATE, and DELETE commands (it has properties for each), which you can either use the DataAdapter designer in VS.NET or a
CommandBuilder to generate, or type them yourself but generating an example to get an idea might be a good idea.
Then, whenever you update, remove, or insert information in the
DataSet, you call
DbDataAdapter.Update(DataSet) which will use the change type information for each
DataRow and will call the appropriate
DbCommand on the
DbDataAdapter. There are several examples of this on the CodeProject web site, as well as examples in the .NET Framework SDK.
-----BEGIN GEEK CODE BLOCK-----
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----