emaduddeen
Programmer
Hi Everyone,
I created this error handler to trap when the user types in an dependent id from a data grid view using Oracle as the database. I did it to replace the default error dialog that is displayed when an error occurs:
I don't know what code I need to add to the sub procedure to trap an Oracle "Unique Constraint" error. Could you tell me how to do it?
I wish to use a case structure to trap for this. Once I'm able to trap for this error then I plan to add more to the case structure.
Thanks.
Truly,
Emad
I created this error handler to trap when the user types in an dependent id from a data grid view using Oracle as the database. I did it to replace the default error dialog that is displayed when an error occurs:
Code:
Public Sub DataErrorEventHandler(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles DEPENDENTSDataGridView.DataError
MessageBox.Show("My Actual Data Error Goes Here", "OOOPPPPS")
End Sub
I don't know what code I need to add to the sub procedure to trap an Oracle "Unique Constraint" error. Could you tell me how to do it?
I wish to use a case structure to trap for this. Once I'm able to trap for this error then I plan to add more to the case structure.
Thanks.
Truly,
Emad