datatable compare
I have a DataTable dtOld with records from database.
I have a DataTable dtNew with new records to be written to the database.
开发者_如何学PythonCan someone please help with the best way to send the new DataTable dtNew to the database without records that already exist in the dtOld DataTable?
thanks, rodchar
Rather than maintain two separate DataTables, it might be easier to use the technique demonstrated here:
http://msdn.microsoft.com/en-us/library/xzb1zw3x%28VS.80%29.aspx
You can use a DataAdapter to update the database with records that have a particular row state (added, for instance).
精彩评论