I am developing a database app using vb.net and SQL Server. I am trying to come up with a way I can detect if the user has made any changes/updates to any data currently displayed on the form so that I can set a varible that I would check when the user closes the form to promt them to save their changes. I want to avoid writing a Sub for every Textbox_Change event in the entire app.
Use the events with the datatable you are using i.e.
The DataTable object provides a series of events that can be processed by an application. The following table describes DataTable events.
1) ColumnChanged Occurs when a value has been inserted successfully into a column.
2) ColumnChanging Occurs when a value has been submitted for a column.
3) RowChanged Occurs after a row in the table has been edited successfully.
4) RowChanging Occurs when a row in the table is changing.
5) RowDeleted Occurs after a row in the table has been marked as Deleted.
6) RowDeleting Occurs prior to a row in the table being marked as Deleted.
Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!
Or try our Ask An Expert service to answer any of your questions!