background image
<< Modifying Error Handling Locally | override the error >>
<< Modifying Error Handling Locally | override the error >>

CtLib Result Set Errors

Database Vuser Scripts · Developing Database Vuser Scripts
Creating Vuser Scripts
Chapter 9, page 159
CtLib Result Set Errors
In CtLib recording, the application retrieves all of the available result sets after
executing a statement. If the returned result set contains fetchable data, the
application performs bind and fetch operations on the data as indicated in the
following example:
If a result set does not contain fetchable data, bind and fetch operations cannot be
performed.
When you parametrize your script, result data may become unfetchable
(depending on the parameters). Therefore, a CtLib session that recorded bind and
fetch operations for a particular statement, may not be able to run, if the new data
is unfetchable. If you try to execute an lrd_bind_col or an lrd_fetch operation, an
error will occur (LRDRET_E_NO_FETCHABLE_DATA -- error code 2064) and
LoadRunner will terminate the script execution.
lrd_stmt(Csr15, "select * from all_types", -1, 148, -99999, 0);
lrd_exec(Csr15, 0, 0, 0, 0, 0);
lrd_result_set(Csr15, 1 /*Succeed*/, 4040 /*Row*/, 0);
lrd_bind_col(Csr15, 1, &tinyint_D41, 0, 0);
lrd_bind_col(Csr15, 4, &numeric_D42, 0, 0);
. . .
lrd_fetch(Csr15, -9, 0, 0, PrintRow3, 0);