Jump to content

Question about the "unhandled exception".. C#


M.J.

Recommended Posts

Hi All.. This is my first topic here :)I want to ask about how to check for errors in the execution of the OleDb commands.. I need to check for duplicate keys when inserting rows in an access database table.Because when running the program and inserting a duplicate name, an unhandled error exception message appears. So I want to display an error MessageBox instead.. Thanks.. :)

Link to comment
Share on other sites

Hi All.. This is my first topic here :)I want to ask about how to check for errors in the execution of the OleDb commands.. I need to check for duplicate keys when inserting rows in an access database table.Because when running the program and inserting a duplicate name, an unhandled error exception message appears. So I want to display an error MessageBox instead.. Thanks.. :)
The term "unhandled exception" refers to the fact that you have not included exception-handling code. The way to include exception-handling code is a try-catch block in your code. This allows you to catch the exception and take appropriate action such as displaying a messagebox in this case.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...