Forum Discussion

Deepak's avatar
Deepak
New Contributor
16 years ago

Working with datasource teststep

Hi,

How can access data from the datasource resultset?
For Eg:
Lets say I am using JDBC data connection and I have a property by name EMP_NAME
When I run the following query.
SELECT EMP_NAME FROM EMPLOYEE;
the property EMP_NAME will hold all the EMP_NAME.
Now the question is how do I operate on this result set? Is this EMP_NAME an Array?
I tried accessing it as EMP_NAME[1], it didnt work.

Regards,
Deepak

3 Replies

  • Deepak's avatar
    Deepak
    New Contributor
    Any help with this is appreciated.
    Let me know if anymore information is required regarding the problem.

    Regards,
    Deepak
  • Buschfunk's avatar
    Buschfunk
    Frequent Contributor
    I'm not 100% sure but I think the result is handled as a normal string?!
  • Hello,

    When the DataSource TestStep is executed, its properties will be populated with a single row from the result set. You need to add a DataSource Loop TestStep to iterate over the different rows. For example, your setup may include DataSource -> Requests ... -> DataSource Loop. Everything inbetween the DataSource step and the Loop step will be run once for each row in the result set. For more information, check out the userguide here and here.

    Regards,
    Dain
    eviware.com