FileAdapter.ReadRandomRRN Method
Definition
Namespace: ASNA.DataGate.Client
Assembly: ASNA.QSys.DataGate.Client.dll
Reads a record from the file that the FileAdapter is working with using the specified relative record number (RRN).
void ReadRandomRRN([AdgDataSet ds, ReadRandomMode mode, LockRequest lr, long RRN)
Parameters
Type | Parameter name | Description |
---|---|---|
AdgDataSet | ds | The AdgDataSet to fill with the data from the record. |
ReadRandomMode | mode | The ReadRandomMode to use when reading the record. |
LockRequest | lr | The LockRequest to use when reading the record. |
Int64 | RRN | The relative record number of the record to read. |
Remarks
This method reads a file record specified by relative-record number (RRN), or an arrival-oriented location in the file. If no such RRN exists in the file the method throws dgException, with the Error property set to dgEaNOTFND.
If the operation is successful, the record read is placed in the specified AdgDataSet object. The record is appended to a DataTable in the AdgDataSet corresponding to the record format. The record is appended as a DataRow object in the DataTable, and the AdgDataSet.ActiveRow
property will reference this DataRow on return.
A successful read operation optionally locks the record read as directed by the lr parameter and the locking properties of the file.
The mode parameter is currently ignored. To maintain your code’s compatibility with future enhancements, please use the value ReadRandomMode.Equal for this parameter.
Calling this method cancels “range mode”. A prior successful call to ReadRange
or SeekRange
places the FileAdapter in range mode, in which only records with keys in a specified range are accessed. This method cancels the restriction.