I am running VBscript within a DTS Package.(ActiveX Script Task)
It railroads you into using a function called Main() as the backbone of the script.
I create and open connection and recordset objects etc to read an SQl Server d/b.(successfully)
I have another function called Search_Orders() which also executes SQL commands. I have created it for modularity's sake.
When I reference this function from the Main()function, it seems to loose the connection to the d/b that I had already established in the main function. It doesn't complain, it just exits the referenced function at the point of call to the d/b.
I have to create and open another connection object within the nested function, which seems unecessary.
Any thoughts then on the scope/persistence of open connections.
Thanks
It railroads you into using a function called Main() as the backbone of the script.
I create and open connection and recordset objects etc to read an SQl Server d/b.(successfully)
I have another function called Search_Orders() which also executes SQL commands. I have created it for modularity's sake.
When I reference this function from the Main()function, it seems to loose the connection to the d/b that I had already established in the main function. It doesn't complain, it just exits the referenced function at the point of call to the d/b.
I have to create and open another connection object within the nested function, which seems unecessary.
Any thoughts then on the scope/persistence of open connections.
Thanks