![]() |
| |||||||
Automation Anywhere Server & Enterprise Post messages and questions related to Automation Anywhere Server or Automation Anywhere Enterprise here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
I inherited some lengthy scripts from a previous co-worker. I am now tasked with making some significant changes to the scripts. Part of the changes involve adding more calls to the db. I notice that in all the previously scripted db calls, the AA script connects to the db, then runs the sql statement that returns a dataset (table with a single row), then does stuff with the data, and then disconnects from the db. Is this the required pattern? If I disconnect before attempting to work with the data in the dataset will that cause the dataset to clear? I would like to keep the db connection period as short as possible. Thanks in advance for any ideas |
| |||
|
Hello remo.mills, The following are the answers to your questions: Yes, this is the required pattern as sql connection works on sessions. If we disconnect early, the session will be lost and you wont be able to find the data in the data set variable as that session gets expired. If you want to work after disconnecting the database session, you will have to select "export to csv" from sql query command which will export all the sql data to the csv file and you can use that csv file by making use of "read from csv" command after disconnecting the database session. Let us know if you have any doubts. Thanks & Regards |
![]() |
| Thread Tools | |
| Display Modes | |
| |