Codeunit 18122339 EOS004 DB ResultSet

Codeunit 18122339 EOS004 DB ResultSet

Provides access to a database reader for external databases over the EOS FunctionAPI. You cannot instantiate this class directly, it is returned from the DB API Client.

Methods

BatchSize

procedure BatchSize(NewValue: Integer)

Sets the current batch size. The batch size indicates how many records are read in each call to the EOS FunctionAPI. This defaults to 50.

Parameters / Return Value

  • NewValue Integer

    The new batch size. If you set this to 0, the default batch size will be used.


BatchSize

procedure BatchSize(): Integer

Gets the current batch size. The batch size indicates how many records are read in each call to the EOS FunctionAPI. This defaults to 50.

Parameters / Return Value

  • Returns Integer

    The current batch size.


ReaderId

procedure ReaderId(): Guid

Returns the ID of the reader that is currently being used.

Parameters / Return Value

  • Returns Guid

    The ID of the reader.


ConnectionId

procedure ConnectionId(): Guid

Returns the ID of the connection that is currently being used.

Parameters / Return Value

  • Returns Guid

    The ID of the connection.


Columns

procedure Columns(): List of [Text]

Returns a list of all column names in the current dataset

Parameters / Return Value

  • Returns List[Text]

    The list of column names


DataType

procedure DataType(Index: Integer): Text

Returns the C# data type of the given column, by column index.

Parameters / Return Value

  • Index Integer

    The 1-based index of the column

  • Returns Text

    The C# data type.


DataType

procedure DataType(ColumnName: Text): Text

Returns the C# data type of the given column, by column name.

Parameters / Return Value

  • ColumnName Text

    The name of the column.

  • Returns Text

    The C# data type.


Value

procedure Value(Index: Integer): JsonValue

Returns the value of the current row as a JsonValue, by column index. If the index is invalid or does not exist, a null JsonValue is returned.

Parameters / Return Value

  • Index Integer

    The 1-based index of the column.

  • Returns JsonValue


Value

procedure Value(ColumnName: Text): JsonValue

Returns the value of the current row as a JsonValue, by column name. If the index is invalid or does not exist, a null JsonValue is returned.

Parameters / Return Value

  • ColumnName Text

    The name of the column.

  • Returns JsonValue


Row

procedure Row(): JsonArray

Returns the current row as a JsonArray

Parameters / Return Value

  • Returns JsonArray

Read

procedure Read(): Boolean

Read the next row in the dataset.

Parameters / Return Value

  • Returns Boolean

    Returns true if a record was read, false if no more records are available.


Close

procedure Close()

Closes the current reader. This is a TryFunction.



EOS Labs -