ContributionsMost RecentMost LikesSolutionsRe: Using Dynamic SQL in TestComplete DBTable function updateDBTable() { var location_id = 1234; var connectionString = "Provider=OraOLEDB.Oracle.1;Password=XXXX;Persist Security Info=True;User ID=XXXX;Data Source=DB_NAME"; var query = "SELECT COL_1, COL_2, COL_3, COL_4, COL_5, COL_6, COL_7 FROM SAMPLE_TABLE WHERE LOCATION_ID = " + location_id ; var connection = ADO.CreateConnection(); var recordset = ADO.CreateRecordset(); connection.Open(connectionString); recordset.Open(query, connection); if (!recordset.EOF) { recordset.MoveFirst(); var dbTable = DBTables.Person_Address_Dyn; dbTable.$set("Values", 0, 0, recordset.Fields.Item("COL_1").Value); dbTable.$set("Values", 0, 1, recordset.Fields.Item("COL_2").Value); dbTable.$set("Values", 0, 2, recordset.Fields.Item("COL_3").Value); dbTable.$set("Values", 0, 3, recordset.Fields.Item("COL_4").Value); dbTable.$set("Values", 0, 4, recordset.Fields.Item("COL_5").Value); dbTable.$set("Values", 0, 5, recordset.Fields.Item("COL_6").Value); dbTable.$set("Values", 0, 6, recordset.Fields.Item("COL_7").Value); } if (recordset.State == 1) recordset.Close(); if (connection.State == 1) connection.Close(); } The data is available in the Person_Address_Dyn in the same execution as this code, but not for later executions. Re: Using Dynamic SQL in TestComplete DBTable Ok sure, will focus on fetching data using a script. I am able to connect to the DB and retrieve query results in my javascript. But I am unable to set the data into persistent DBtables as the DBtables are static. Even with the following code: Modifying DBTable Elements | TestComplete Documentation (smartbear.com) Re: Testcomplete : Loading DB data before triggering execution of keyword tests I tried with the ADO components as well, but the underlying queries are taking time, hence I am exploring options. So kindly help me in setting up a local data storage/cache for my queries. Re: Using Dynamic SQL in TestComplete DBTable I am looking for a way to specify the variable in the DBtable wizard in the following ways, but just get the error "invalid character". So what wound be the correct way to do that: select * from employee where account_no = Project.Variable.ACC_NO select * from employee where account_no = #Project.Variable.ACC_NO# select * from employee where account_no = '#Project.Variable.ACC_NO#' As you suggested, I too prefer to do this in a JavaScript. But unable to find a way to set the values retrieved into a Persistent DBTable. So any advice here. Re: Testcomplete : Loading DB data before triggering execution of keyword tests I am using the Oracle SQLs(same as the app under test use) with different levels of complexities based on the web page, ensuring that each query returns only 1 row. For the approach, I am planning to run a Javascript in the beginning to fetch rows from DB and initialise the data in some persistent variables, then use Keyword test that use this data to fill up the forms and validate the data returned on pages. Using Dynamic SQL in TestComplete DBTable Our application data is completely refreshed every month, so the record values/keys change. Is there a way i can make the queries dynamic in the DBTable wizard. For e.g. I want to use something like the following in the DBTable wizard. select * from employee where account_no=? SolvedTestcomplete : Loading DB data before triggering execution of keyword tests I want to validate my Web page data for e.g. selected product details, with the data in the database. But the queries being slow, I want to run all the queries in the project in advance before triggering the actual executions. Sort of like a local data storage/cache. Is there a way we can do it? Is there a better approach to handle this? SolvedMobile Device is disconnected at the end of playback Hello team, I am using TestComplete 15 to perform automation tests on Android Samsung Galaxy S10e, physical device. The mobile connects to TestComplete via an Appium 1.22 server. The problem is that the mobile disconnects from TestComplete at the end of every playback, inspite of using noReset in the appium capability JSON. Kindly help. Thanks