background image
<< Decide which value to correlate | stored-procedure >>
<< Decide which value to correlate | stored-procedure >>

Using Correlated Query Functions

Creating Vuser Scripts
Chapter 10, page 164
Database Vuser Scripts · Correlating Database Statements
In
Using Correlated Query Functions
To correlate statements, you modify your recorded script in the VuGen editor using
one or more of the following LRD functions. VuGen inserts these functions for you
when you use the automatic correlation process:
·
lrd_save_col saves the result value of a query which appears in a grid (the
specified row and column) to a parameter. Use lrd_save_col when working with
lrd_fetch.
Place the lrd_save_col function before the fetching of the data. It assigns the value
retrieved by the subsequent lrd_fetch to the specified parameter.
Note: In general, you see which statement is problematic, and then the correlated
query tool searches previous statements to find all possible values to correlate.
You could also go straight to the results value of a query (grid) and select the
value to save, even if you don't intend to use it until much later on in your script.
For example, suppose the server assigns a session-ID to the client, and you will
not need the session-ID until later. You can automatically insert an lrd_save_col
statement to save it by highlighting the value in the grid and pressing F8.