Classification
Name |
NextResult
|
Short Description |
Moves the cursor forward one row from its current position.
|
Class |
Term
|
Extension |
OTX SQL extension
|
Group |
SQL related Terms
|
Exceptions |
|
Checker Rules |
|
Standard Compliant |
Yes
|
OTL Syntax
BooleanTerm SQL.NextResult(ResultSetTerm resultSet);
Description
The NextResult term moves the cursor forward one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the term NextResult makes the first row the current row; the second call makes the second row the current row, and so on. When a call to the NextResult term returns false, the cursor is positioned after the last row.
Return Value
The Term returns the value, see table below.
|
|
In OTX, Terms are categorized according to its return data type!
|
Data Type |
Description
|
Boolean |
When a call to the NextResult term returns false, the cursor is positioned after the last row.
|
Properties
Name |
Data Type |
Class |
Default |
Cardinality |
Description
|
resultSet |
ResultSet |
Term |
- |
[1..1] |
This element represents the result set from which the next row will be selected.
|
OTL Examples
/// Local Declarations
SQL.Connection Connection1;
SQL.ResultSet ResultSet1;
Boolean Boolean1;
/// Flow
try
{
// for DotNet platform
Connection1 = SQL.CreateConnection("DRIVER={SQL Server};Server=.;InitialCatalog=classicmodels;username=sa;password=saas");
}
catch (Exception)
{
// for Java platform
Connection1 = SQL.CreateConnection("jdbc:sqlserver://localhost;databaseName=classicmodels;username=sa;password=saas");
}
SQL.ExecuteQuery(Connection1, "select * from classicmodels.dbo.orders", ResultSet1);
Boolean1 = SQL.NextResult(ResultSet1);
while (Boolean1) : WhileLoop1
{
Boolean1 = SQL.NextResult(ResultSet1);
}
SQL.CloseConnection(Connection1);
See also