I don't know if you got your answers, but since we all look at the answers here. Hope this is what you were looking for.
dim con as new sqlconnection
con.connectionstring="<<put your conn string here>>"
'try...catch block fires exception if the con is not successfully opened
try
con.open()
catch ex as exception
msgbox ex.message
end try
source
share