Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataSet.HasErrors() - What kind of errors? 1

Status
Not open for further replies.

Blitz

Technical User
Jul 7, 2000
171
0
0
US
Im wondering what kind of errors "DataSet.HasErrors()" would be detecting? ie why should I include a has errors check in my code. Thanks for any info.
 
As users work on a set of data contained in a DataSet, you can mark each change with an error if the change causes some validation failure. You can mark an entire DataRow with an error message using the RowError property. You can also set errors on each column of the row with the SetColumnError method.

Before updating a DBMS with a DataSet, it's recommended that you first invoke the GetChanges method on the target DataSet. The method results in a DataSet that contains only the changes made to the original. Before sending the DataSet to the DBMS for updating, check the HasErrors property of each table to see if any errors have been attached to the rows or columns in the rows.

After reconciling each error, clear the errors with the ClearErrors method.


--------------------------------------
"We are star-stuff. We are the universe made manifest trying to figure itself out."
-- Delenn in Babylon 5 - "A Distant Star"
 
Thank you, great explaination.
 
You're welcome, Blitz.

--------------------------------------
"We are star-stuff. We are the universe made manifest trying to figure itself out."
-- Delenn in Babylon 5 - "A Distant Star"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top