Hi,
I am working on a windows form application.
I have a table(User Table)with the following 4 columns.
ID Integer,
Name varchar(50),
last_update datetime,
last_update_by varchar(10).
I have generated a dataset for this tableusing the wizard (Add new datasource).
I draged and drop this datasource on to a form with Datagridview mode option on.it has generated the Binding navigator,table adapter,binding source etc.
I have also have detail view of the datasource on the same form.
then I have removed last_update and last_update_by fields from both the views(detail and datagridview).basically i am not showing last_update and last_update_by fields to the user. But when ever user adds a new row ormodifies ID or Name, i want to update the last_update and last_update_by columns with current username and current datetime.
how to update these fields and where to update ( i mean under which event?)
i am using table adapter to update the database like this
Private
Sub USER_TABLEBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles USER_TABLEBindingNavigatorSaveItem.Click
Me.Validate()
Me.USER_TABLESBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.UserDataSet)
End Sub
please advice me, if possible with some code
Thanks