Compare Database with Database in Data Grid View

Wiz Kid

Member
Joined
Aug 3, 2007
Messages
21
Location
Atlanta, GA, USA
Programming Experience
1-3
Hello VBDotNETForums.

I am new to ADO.NET.

I have an Access (2003) database that I've got binded to a data grid view. What I need to do is compare the data in the data grid view to the actual database. Then, if there are changes, I will save the changes.

What exactly do I need to be comparing?

Thanks!
 
What you should be doing is using the power of databinding. Bind the dataGridView to a dataset, then you can check the HasChanges property of the dataset to see if it has changes. If it does, use a DataAdapter to update the changes (usually the same DataAdapter used to fill the dataset).
This is the basic idea of ADO.NET, a disconnected architecture utilized to limit communication with the database and therefore improve performance.
Check out msdn2.microsoft.com for many articles on ADO.NET.
 
Back
Top