Get unique value from VTS
I have installed VTS 2 and upload the datafile...
I am able to connect to VTS from my loadrunner script...
I would like to get unique value from VTS table to use in my script.
I found only 2 query methods
Query_column has the input params of column name and row number.
Is it possible to get next available unique value from particular column by just specifying column name.
If so, whats the method to get next available unique value from a column?
Thanks in advance.
VTS is a simple table structure. It has no knowledge or constraints on content, so "unique" is irrelevant here. You can only retrieve whatever data you have addedd to VTS, either by querying by row and column or by reading and removing (or "popping") the last entry. If that data is unique, that's fine.
Could you supply an example set of data rows (just a few) and how you are using the data?
Thanks Dave. i have unique data in VTS table. I was looking for a method to retrieve and delete the first entry.
tried few methods... vtc_retrieve_message is doing the job for me... Thanks....
This is the simplest method of popping a record
The column names become the parameter names - just use those you need.
lrvtc_connect(VTS_IP, VTS_PORT, VTOPT_KEEP_ALIVE);
It has been 4 or 5 years since I last played with the VTS, and I no longer have access to the scripts, but in essence, how I did this was roughly as follows:
1. Connect to the VTS
2. Used a loop to query each row starting from the top each row starting from the top for first an unlocked cell (explained next) and than an unmodified cell (explained later).
3. Once both filters in 2 are found, I enter a lock on that row (a simple 1 in the lock column)
4. Grab the data from the column needed
5. Set the modified column to 1
6. Set the the row to unlocked
This seems like a lot of steps and the other commenters suggestion of the pop method may prove helpful. But the above steps allowed me to use that same table and data for other portions/scripts that needed modified data.