ResultSet Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The ResultSet class provides access to a table of data generated by executing a Statement.
public ref class ResultSet : Microsoft::Dynamics::Ax::Xpp::XppObjectBase
[Microsoft.Dynamics.Ax.Xpp.KernelClass]
public class ResultSet : Microsoft.Dynamics.Ax.Xpp.XppObjectBase
[<Microsoft.Dynamics.Ax.Xpp.KernelClass>]
type ResultSet = class
inherit XppObjectBase
Public Class ResultSet
Inherits XppObjectBase
- Inheritance
- Attributes
Remarks
For maximum portability, ResultSet columns within each row should be read in left-to-right order and each column should be read only once. A ResultSet provides access to a table of data generated by executing an instance. The table rows are retrieved in sequence. Within a row its column values can be accessed in any order. A ResultSet maintains a cursor that points to its current row of data. Initially the cursor is positioned before the first row. The 'next' method moves the cursor to the next row. For the getXX methods, Finance and Operations attempts to convert the underlying data to the specified type and returns a suitable value. The getXX methods retrieve column values for the current row. You retrieve values using the index number of the column. Columns are numbered from 1. A ResultSet is automatically closed by the statement that generated it when that Statement is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results.
The following example demonstrates the ResultSet class.
static void example()
{
Connection Con;
Statement Stmt;
ResultSet R;
SqlStatementExecutePermission perm;
str sql = 'SELECT VALUE FROM SQLSYSTEMVARIABLES';
Con = new Connection();
Stmt = Con.createStatement();
perm = new SqlStatementExecutePermission(sql);
perm.assert();
R = Stmt.executeQuery(sql);
while ( R.next() )
{
print R.getString(1);
}
}
Constructors
ResultSet() | |
ResultSet(IntPtr) | |
ResultSet(Statement) |
Fields
kernelClass | (Inherited from XppObjectBase) |