ResultSet Class

Definition

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
Microsoft.Dynamics.AX.KernelInterop.ProxyBase
ResultSet
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)

Methods

__shouldCallNew(Type) (Inherited from XppObjectBase)
addXppProxyReference(Type, Object) (Inherited from XppObjectBase)
Call(String, Object[], Type[], Object[]) (Inherited from XppObjectBase)
cancelTimeOut(Int32) (Inherited from XppObjectBase)
close()

Releases the object's database resources immediately.

createKernelClass(Object[], Type[], Object[]) (Inherited from XppObjectBase)
equal(XppObjectBase) (Inherited from XppObjectBase)
finalize() (Inherited from XppObjectBase)
getBoolean(Int32)

Retrieves the Boolean value of a column in the current row.

getByte(Int32)
getDate(Int32)

Retrieves the value of a column in the current row as an Finance and Operationsdate value.

getDateTime(Int32)
getGuid(Int32)
getInt(Int32)

Retrieves the value of a column in the current row as an integer.

getInt64(Int32)
GetIntPtr()
GetKernelInstanceUniqueId() (Inherited from XppObjectBase)
getMetaData()
getReal(Int32)

Retrieves the value of a column in the current row as a value of the type real.

getString(Int32)

Gets the string value of a column in the current row.

getTimeOutTimerHandle() (Inherited from XppObjectBase)
getXppProxyReference(Type) (Inherited from XppObjectBase)
handle()
IsManagedValid()
kernelhandle()
KernelInstanceDisposed() (Inherited from XppObjectBase)
MakeReflectionCall(String, Object[]) (Inherited from XppObjectBase)
newmethod()
next()

Selects the first or subsequent row.

notify() (Inherited from XppObjectBase)
notifyAll() (Inherited from XppObjectBase)
objectOnServer()
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32)
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32, Boolean)
Obsolete.
(Inherited from XppObjectBase)
usageCount() (Inherited from XppObjectBase)
VerifyKernelClass() (Inherited from XppObjectBase)
wait() (Inherited from XppObjectBase)
wasNull(Int32)

Reports whether the last column read has the value SQL NULL.

Xml() (Inherited from XppObjectBase)
Xml(Int32) (Inherited from XppObjectBase)

Applies to