Forum Discussion
mcbane
Contributor
If you're wanting the same thing I needed--YES!
In JavaScript, I have variables setup as generic SQL queries. For example, to run a query against a specific account, I use a text variable with a value like:
select *
from table
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!
Tommy
sonya_m
4 years agoSmartBear Alumni (Retired)
Thanks everyone for trying to help!
tuanvinh1008 did you manage to solve this? Looks like mcbane has an idea of what could work.
Related Content
- 10 years ago
- 2 years ago
- 4 years ago
Recent Discussions
- 9 hours ago
- 7 days ago
- 10 days ago