active directory - VBScript and AD connections -


do know if there issues opening ad connection 3 times in script? i'm building hta application user terminations composed vbscript:

sub confirmation -> connect ad -> check if user exists -> end ad connection - objconnection.close -> ask user confirmation call phase1 / phase 2, else exit sub  sub phase1 -> connect ad -> perform actions -> objconnection.close  sub phase2 -> connect ad -> perform actions -> objconnection.close 

question is, connection remain active through sub phase1 , sub phase2 if not close in sub confirmation?

that depends. seems you're waiting user input before going confirmation phase1 and/or phase2. may take long time, it's possible connection times out (default timeout 15 seconds). in scenario it's preferable close connection in confirmation , re-open after user made choice.

otoh, in situations don't have wait user input it's better keep connection open, because closing , re-opening unnecessary overhead.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -