SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
24x7 Scheduler version 3.4.24 DatabaseConnect issue

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
24x7 Scheduler version 3.4.24 DatabaseConnect issue
Author Message
kostyl



Joined: 06 Nov 2012
Posts: 1
Country: Ukraine

Post 24x7 Scheduler version 3.4.24 DatabaseConnect issue Reply with quote
Hello.

I have following issue with DatabaseConnectEx statement. When i use it in my .jal file everything works fine, job successfully connects to db and can receive data from DatabaseRetrieve statement etc.

But when i use DatabaseConnectEx in created by myself script in Script Library - i have connection to db only in created script. In that script connection succeeds, i can receive data from DatabaseRetrieve etc, but when script finishes and i return to jal file - connection to db disappears! DatabaseRetrieve throws an error that there is no connection to database.

Is it possible to keep connection during the whole .jal file running, including scripts from script library? Can you tell me what i did not do or what i did wrong?

Thanks a lot!
Tue Nov 06, 2012 1:31 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6484

Post Reply with quote
The scope of both DatabaseConnect and DatabaseConnectEx is limited to the current script only. DatabaseDisconnect is executed implicitly when the script completes and the connection goes out of scope. If you need a connection both in the JAL job script and user-defined JAL statement , you would need to open 2 separate connections, one from each script.

Just a tip, an alternative to using reusable user-defined statements is using external reusable JAL files that are "included" into the main script using @SCRIPT tag.
Tue Nov 06, 2012 1:37 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.