Question intentional UPDATE exception

Noremacam

Member
Joined
Jun 30, 2008
Messages
14
Programming Experience
1-3
This question may not be specific to mysql. How do I make an UPDATE statement that will throw an exception if zero rows are affected by the update? Or is there an alternative that I'm missing?:confused:
 
Check if your dataset has any changes.

VB.NET:
If yourDataSet.HasChanges() Then
    'Code to do your Update
Else
    MessageBox.Show("No changed records")
End If
 
Back
Top