How to parameterize or pass the value from previous step for a SQL Query in HP UFT Api test step
How to parameterize or pass the value from previous step for a SQL Query in HP UFT Api test step.
Tried to pass the complete property name, but it didn't work.
Following is the example:
select empID from employee where empid=12345
Wanted to pass the value form previous instead of actual value 12345
Say you first query is;
SELECT EMP_ID FROM EMPLOYEES;
and your record set object is oRec1 for above query. You can assign the value to some variant and access in your 2nd query like;
strEmpID = oRec1.Fields("EMP_ID").Value ' From first query results
SELECT * FROM EMP_BENEFITS WHERE EMP_ID = strEmpID '2nd query line.
Also take care of the corresponding record from the results based on your logic, loops, etc.
All the thoughts here are mine not related to my employer nor anyone.
Test Automation Ecstasy