views:

120

answers:

3

Is there any way to bind a DataTable object to an actual table in my database? Right now I perform a query and fill the DataTable with the result. It would be really cool if I could just DataTable.(Save/Update) with out having to write additional code!

Is such a thing or a similar solution possible?

A: 

Take a look at MyGeneration (template based code generator) and EasyObjects (ORM Mapping library) which, when combined, get you pretty close to this. MyGeneration will even write the CRUD stored procedures for you (but you need to apply them to the db).

Rob Allen
+2  A: 

See DataAdapter.Update(). You should write some code..

Canavar
A: 

Have a look at Entity Framework. With EF you make your changes and then call "savechanges", that will then persist any changes.

Shiraz Bhaiji