Here's a small fix that will show what the error is.
You are only showing in the message box the word "error"
Show the error message from the exception.
However, you need to get to know your debugger.
The debugger is one of the most important tools you have.
try
{
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}