iTP Active Transaction Pages (iTP ATP) Programmer's Guide
ATP Objects, Properties, and Methods
iTP Active Transaction Pages (iTP ATP) Programmer’s Guide—522292-002
4-33
atp.request Object
difficult approach) or suffix field names with a numeric index (such as
PartField_01 or PartField_02) and get the values as follows:
for (i=0; i<atp.request.variables.length;i++)
{
if ((atp.request.variables[i]).indexOf('PartField_')==0)
{
atp.print (atp.request.variables[i] + '=' +
atp.request[atp.request.variables[i]] + '\n');
}
}
variable property (read-only)
For each variable in the variables array, the atp.request object also has a
property with the same name as the variable. The value of the property is the value
of the environment variable of the same name. All values are strings except when
you use RFC1867/multipart/form-data support for forms-based file upload. In the
latter case, the type of variable is file, and the value is an atp.blob object.
Methods
close
ATP 2.0 will release the internal cache entry of the SQL statement when the close
method is called. The subsequent methods like execute or next will report an error,
“Invalid SQL statement”, after the close method. The close method between
multiple execute methods is not necessary for the same SQL statement on the same
page. ATP 2.0 will close and re-open the internal SQL cursor for the second and
subsequent execute methods.
execute
ATP 2.0 will check the number and types of parameter values passed by the
applications. ATP will report errors if the syntax of the parameters violates the
following rules:
1. There must be one parameter for each SQL placeholder in the SELECT
statement.
2. If the number of parameters is greater than the number of SQL variable
placeholders in the SELECT statement, the type of parameter following the last
SQL placeholder must be the atp.transaction object.