I have a function that evaluates whether the current rowstate of a datatable is ADDED. If RowState is Added then an INSERT sql command is executed; if not then an UPDATE sql command is performed.
I just wonder why the RowState in my program is 4 (or Added) even when I did not add any record at all. I placed the function in each of the tab page in a tabcontrol and when I simply change page, the current rowstate is ADDED. This state returns null values for the binded fields and causes the DB validation error to be fired.
Please advise. This is urgent.
Thanks!
I just wonder why the RowState in my program is 4 (or Added) even when I did not add any record at all. I placed the function in each of the tab page in a tabcontrol and when I simply change page, the current rowstate is ADDED. This state returns null values for the binded fields and causes the DB validation error to be fired.
Please advise. This is urgent.
Thanks!