I have here the connection string:
sConn = "OLEDB;Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=VQPBOS;Data Source=" & "GHSI" & strcode
How do I write an "If statements" to display a Msgbox if the connection fails. Because the user needs to input a "strcode" in order to have a complete server name. And the error message would be
Msgbox "Invalid Store Code. Check if the store code you have entered exists in any server"
if it cannot connect to that connection string.
I hope you get it. Thank you :)