On 12/16/2011 8:48 AM, Tony wrote:
> Hello!
>
> This property says in a book that I read.the following.
> "The HasErrors property returns a Boolean value that indicates wheather any
> DataRow objects within the DataSet contains errors. If you're submitting batches
> of changes to your database and you've the ContinueUpdateOnError property of
> your sqlDataAdapter object to True you should check the HasErrors property of
> your DataSet after submitting changes to determine whether any of the update
> attempts failed.
> The DataTable and DataRow classes also expose a HasError property"
>
> Now I just wonder if somebody can give one example about what can cause the
> HasErrors to return true ?
How about attempting to delete a key that doesn't exist? Or to insert one that
does? Or supplying an invalid value for some particular field type? There are
a lot of ways to screw up a database update, I've invented several myself.