I guess you are not using SSIS Package Configurations to store Connection Manager info. If you are you can simply change the config files and the code will not need to change.
If not, then you can try selecting this information from the package XML:
WHERE CAST(CAST([packagedata] AS VARBINARY(MAX)) AS VARCHAR(MAX))
__________________________________________________________________________________________________There are no special teachers of virtue, because virtue is taught by the whole community. --Plato