Hello,
I am stumbling my way through VB.Net, but one area I struggle with is Error Trapping.
Basically I am getting the following error when I try to insert an entry into my table on the DB.
Now I know why I am getting this error obviously, but I'd like to display a friendly message to the user to advise them, rather than them getting a large soap error message like this.Code:System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_tbl_Holidays'. Cannot insert duplicate key in object 'tbl_Holidays'. The statement has been terminated. blah blah blah.....
How can I do this ?
And are there any resources you'd recommend to deal with error trapping ?




Reply With Quote