How to connect SQL Database?

How to get data from a SQL database with ui vision tool.
How to connect to a database from Ui vision and read data from it? If you have any scripts for connecting data base Please advise.

Regard’s
Sivaprasad

You can read/write CSV files directly from within UI Vision.

For database access there are two options: command line interface or XRUN command. The database can be any database (SQL, mySQL,…) since all database access is done in the scripting/programming language.

Both approaches work roughly the same. The key difference is if you want to have the script to be the main controller of the workflow (then use the command line) or if the macro should be in charge (then use XRUNANDWAIT). Of course you can also mix both methods.

Command Line

Here is some RPA example code. You can use any programming language for that. So all database access is done from within the script, e. g. C#, Python or Powershell.

(1) To send data from your script to the RPA software use ${!cmd_var1} command line switch.

(2) To return data from the RPA software back to the script save the data in CSV format and then have your script read the CSV data and then store it back to the database.

XRUN, XRUNANDWAIT

(1) To import data from the database data into the RPA software use the XRUNANDWAIT command to call an external script that reads the database and stores data in CSV format. Then use csvRead to import it into UIvision.

(2) To return data from the RPA software back to the database save the data in CSV format and then use the XRUNANDWAIT command to call a script that reads the CSV and stores the data back into the database.

See also: