test a Connection String

Dec 13 2007 6:00 AM
Hi All

I have an app which allows the user to specify the connection string themselves. ie, there is a text box for them to insert the Server, the database, the username and the password.

I would like to add a function to allow them to test the connection. So when they click on "test" I want to be able to see that the information that they have inserted is correct.

Is there anyone who know's how I can go about testing the string and then reporting back to the user what the error is if there is one?

Thanks in advance.
Ricardo

Answers (1)