ResultSet Class

The ResultSet class provides access to a table of data generated by executing a Statement.

Syntax

class ResultSet extends Object

Run On

Called

Methods

  Method Description
Gg926079.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif close Releases the object's database resources immediately.
Gg926079.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif getBoolean Retrieves the Boolean value of a column in the current row.
Gg926079.pubmethod(en-us,AX.60).gif getByte
Gg926079.pubmethod(en-us,AX.60).gif getDate Retrieves the value of a column in the current row as an Microsoft Dynamics AXdate value.
Gg926079.pubmethod(en-us,AX.60).gif getDateTime
Gg926079.pubmethod(en-us,AX.60).gif getGuid
Gg926079.pubmethod(en-us,AX.60).gif getInt Retrieves the value of a column in the current row as an integer.
Gg926079.pubmethod(en-us,AX.60).gif getInt64
Gg926079.pubmethod(en-us,AX.60).gif getMetaData
Gg926079.pubmethod(en-us,AX.60).gif getReal Retrieves the value of a column in the current row as a value of the type real.
Gg926079.pubmethod(en-us,AX.60).gif getString Gets the string value of a column in the current row.
Gg926079.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif new Initializes a new instance of the Object class. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif next Selects the first or subsequent row.
Gg926079.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg926079.pubmethod(en-us,AX.60).gif wasNull Reports whether the last column read has the value SQL NULL.
Gg926079.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)

Top

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 a 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, Microsoft Dynamics AX attempts to convert the underlying data to the specified type and returns a suitable value.

The getXX (for example,. ) 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.

Examples

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); 
    } 
}

Inheritance Hierarchy

Object Class
  ResultSet Class

See Also

Connection Class