You should not rely on copying connection string directly from connection object,
When Persist Security Info = False, is set in the connection string, In that case, Password
will not be set to the connection string, so you might face a login failed error.