As from the image you've supplied it errors on the open of the connection object.
I would start by checking
1. the connection string via
Connection Strings Website[
^]
2. create a try catch block around the function and see what detail the error message is
post the full error message if you need more help