I have completed a form which it is used to let the user input username and password as well datasource. When they press ok, i want the system to check about the database connection whether it is true of false.
one way to do it is to put the connection in a try/catch block in which if the connection isnt a good one an error will be thrown (and caught in the try/catch block)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.