Update DB using changes made to a DataTable

Oct 2, 2013 at 3:49 PM
I'm experimenting with loading a DB table into a DataTable object using something like:
Context.Sql(_sql).QuerySingle<DataTable>();
The resulting data is placed into a GridView for interactive User modification. Once a row has been modified, I need to update the DB with the changes.

I have access to the original row data and the updated row data. Does FD have any specific functionalities for DataTable driven modifications? If not, what's the recommended way of doing this with FD?

Thanks,

Jeff Godfrey
Coordinator
Oct 6, 2013 at 8:18 AM
DataTable updates are not supported.

However I don't recommend using DataTables in general, instead it's better to use a strongly typed object (such as a Product class) and the update and insert builders.
Oct 25, 2013 at 10:09 PM
Thanks for the response, and sorry for the late reply

In my case, I can't use strongly typed objects as I'm building a "generic" table editor. So, it needs to be able to successfully perform basic CRUD operations on any random table it's pointed at. That's why I'm experimenting with loading data into a DataTable object. Based on the need for the app to interact with unknown table schemas, do you have any general advice or recommendations for performing CRUD via FD?

Thanks,

Jeff