Long time automation technical user, but only recently started using Eggplant. In the past I have used predominantly UFT and VBA / VBScript.
I have used a legacy UFT Script as a starting point and have managed to modify it to connect to an Oracle DB and successfully execute some SQL using a standalone VBScript, but I have been unable to get the connection to work in Eggplant.
The documentation for DBConnections that I was able to find seems very limited, could someone please offer some tips or pointers on how to do this?
After some help from Eggplant Support it turned out I needed to add a DSN to the Oracle Admin (64-Bit) tool, after that I was able to make a connection to the DB and execute some SQL.
I created a DSN in the admin tool called “Oracle” with the relevant Data Source value.
set myDB to (type:“odbc”, DSN:“Oracle”, user:DBUsername, password:DBPassword)
open database myDB
put executeSQL(myDB, MySQL) into DBResults
close database myDB
Log "DB Results : " & DBResults
Log "1st Item : " & The First Item Of DBResults
Log "Password : " & DBResults.Password
It would have been nice to be able to find some detailed documentation on this to save having to og to support. Unfortunately what I found on the topic of DB connections was very limited. More detailed stuff may exist but I couldn’t find it.
Anyway, hopefully this post will help others one day!