I've never tried it. In the past I've used a variable that gets used in an expression in the connection in the package.
More recently I've switched to config files. The upside here is that you can move packages around servers (dev/qa/prod/etc) and the package will read the local config file to determine it's connections. That's a whole different story though. Worth a web search to make your life easier.