Yes, I understand . But when I move from dev to prod, I have to change the connection string every time. if in case missed, all QVDs will have wrong data. So I'm planning to use variable in each environment so that when the data will be correct.
What about creating two LIBs? One for PROD and one for DEV. If your variable states 'PROD' then connect to the lib called MyDatabasePROD and if its 'DEV' then MyDatabaseDEV (LIB:\\MyDatabase$(yourVariable)\).
Or even simpler let the variable contain the name of your lib. LIB:\\$(yourVariable)\