Can we edit SQL query on DBTables in running time
In the DBTables, we can customize the SQL query at the Design but how about if I want to modify the query in running time? because my scenario there are some field will be generated after do some steps.
In TestComplete, I dont think you can modify the query at run time.
Happy to get another members response on that as I am not 100% certain.
If needed, you could perhaps import dB libraries and maybe import a script to do this.
However, the query should still work no?
I mean your not creating new tables or columns every time you run a test or are you?
If you're wanting the same thing I needed--YES!
where account = 12345670
Before I execute the query, I run a replace command to set it to the actual account I need for that particular run:
Query = ProjectSuite.Variables.SQLQueryVariable.replace(new RegExp("12345670","g"),"8675309");
RecSet = AConnection.Execute_(Query);
TestComplete replaces 12345670 with the account number I need, and then executes the query.
I hope this helps!
Thanks everyone for trying to help!
@tuanvinh1008 did you manage to solve this? Looks like mcbane has an idea of what could work.
Community and Education Specialist