Developing in Multi Environment

Do you work in multiple environments like sandbox, test and production?

With the builtin function computername() and a few if statements the need to change your code and database connection each time when moving to another environment is eliminated. The code snippet below is taken from one of my Collect.qvw files.

directory ;
Let vStartTime = now();
$(Include=..\Common\Language_DK.qvs);
if upper(ComputerName()) = 'BI01SAND' then
trace BI01SAND;
$(include=..\local\db\DBSAND.qvs);
Let _db = 'QV_SAND';
else
if upper(ComputerName()) = 'BI02TEST' then
trace BI02TEST;
$(include=..\local\db\DBTEST.qvs);
Let _db = 'QV_TEST';
else
if upper(ComputerName()) = 'BI03PROD' then
trace BI03PROD;
$(include=..\local\db\DBPROD.qvs);
Let _db = 'QV_PROD';
else
trace computername();
exit script;
end if
end if
end if
$(Include=..\Common\Collect.qvs);
Let vEndTime = now();

reply

Various people all over the world take the credit loans in different creditors, just because that is easy and fast.