Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I modified a script of ours to try to dynamically pick a OLEDB connect string. I created a spreadsheet that just has 1 value in it. Either PROD or TEST. I read the table based off of the spreadsheet and assign the value to a variable. I then have the following IF statement:
IF $(ServerEnv) = 'PROD' then
//PROD
OLEDB CONNECT32 TO [Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=wms_dw;Data Source=WMS_DWPROD;Extended Properties=""] (XPassword is PSWD);
ELSEIF $(ServerEnv) = 'TEST' then
//TEST
OLEDB CONNECT32 TO [Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=wms_dw;Data Source=WMS_DWPROD;Extended Properties=""] (XPassword is PSWD);
It runs and says successful but does not hit any of the code after this statement. I did put a text object out on a page so that I could see it change between PROD and TEST and that works fine.
Any ideas?
maybe you should add ' ' to $(ServerEnv) as I suggest in my previous post
IF '$(ServerEnv)' = 'PROD' then
trace PROD;
OLEDB CONNECT32 TO [Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=wms_dw;Data Source=WMS_DWPROD;Extended Properties=""] (XPassword is PSWD);
ELSEIF '$(ServerEnv)' = 'TEST' then
trace TEST;
OLEDB CONNECT32 TO [Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=wms_dw;Data Source=WMS_DWPROD;Extended Properties=""] (XPassword is PSWD);
end if;