Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to manage connections in load script?

Hi, all

i was trying to use reloads depending on some condition from different databases (below is a part of my code) and met with such problem: connections do not depend on condition, i.e. connections are made always, the script make connections and then load or not load in dependence on condition... i would like my script not to connect to database if i will not to reload from it... How to solve the problem?

if ($(vFlagForReload) = 1)then

OLEDB CONNECT32 TO (XPassword is AHfQWEGBT);

// load from some tables from DB1

end if;

if ($(vFlagForReload) = 2)then

OLEDB CONNECT32 TO (XPassword is AHQWERTYU);

//partial reload from some tables of DB2

end if;

1 Reply
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     This code should work. Only remove the ';' after End if

     What is the error which you are getting.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!