MultiFormatDatabaseFile class | QSYS API Reference Guide
Estimated reading time: 12 minutes
Represents a multiformat Database data file. It contains methods to handle all Input and Output operations on the file.
Namespace: ASNA.QSys.Runtime
Assembly: ASNA.QSys.Runtime.dll
Inheritance: Object β> FileBase β> DatabaseFileBase
Properties
Type |
Name |
Description |
Dictionary<String, AdgKeyTable> |
Keys |
Gets the dictionary relating the format name to its key table. These are the main key tables for random access. |
Dictionary<String, AdgKeyTable> |
Kezs |
Gets the secondary dictionary relating the format name to its key table. These are the βtoβ key tables for operations that require from/to keys. |
Methods
Signature |
Description |
allocateBuffer() |
Allocates a DataSet Buffer. |
Chain(String, Boolean, Object[]) |
Read a record format using a key. |
ChainByRRN(String, Boolean, Int32) |
Read a record format using the relative record number. |
ChainByRRN(String, Boolean, Decimal) |
Read a record format using the relative record number. |
Delete(String) |
Delete the current record. |
Delete(String, Object[]) |
Delete the current record. |
DeleteByRRN(String, Int32) |
Delete a record using its relative record number. |
DeleteByRRN(String, Decimal) |
Delete a record using its relative record number. |
DeleteRange(String, Object[], Object[], RangeFirst, RangeLast) |
Delete a range of records. |
ReadNext(String, Boolean) |
Read the next record sequentially. |
ReadNextEqual(String, Boolean, Object[]) |
Read the next record sequentially, if it has the same key. |
ReadPrevious(String, Boolean) |
Read the previous record sequentially. |
ReadPreviousEqual(String, Boolean, Object[]) |
Read the previous record sequentially, if it has the same key. |
ReadRange(String, Object[], Object[], RangeMode, RangeFirst, RangeLast, Boolean) |
Read a range of records. |
Seek(String, SeekMode, Object[]) |
Positions the file cursor in the record indicated by key. |
SeekByRRN(String, SeekMode, Int32) |
Positions the file cursor in the record indicated by relative record number. |
SetRange(String, Object[], Object[], RangeMode, RangeFirst, RangeLast) |
Sets the range of records for input operations. |
AdgDataSet allocateBuffer()
Allocates a DataSet Buffer.
AdgDataSet allocateBuffer()
Read a record format using a key.
bool Chain(string formatName, bool lockRecord, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to read. |
Boolean |
lockRecord |
True to lock the record after the Read. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if the record is found, false otherwise. |
Read a record format using the relative record number.
bool ChainByRRN(string formatName, bool lockRecord, int rrn)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to read. |
Boolean |
lockRecord |
True to lock the record after the Read. |
Int32 |
rrn |
Relative record number of the record to read. |
Returns
Type |
Description |
Boolean |
True if the record is found, false otherwise. |
Read a record format using the relative record number.
bool ChainByRRN(string formatName, bool lockRecord, decimal rrn)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to read. |
Boolean |
lockRecord |
True to lock the record after the Read. |
Decimal |
rrn |
Relative record number of the record to read. |
Returns
Type |
Description |
Boolean |
True if the record is found, false otherwise. |
Delete the current record.
bool Delete(string formatName)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to delete. |
Returns
Type |
Description |
Boolean |
True if the record was found, false otherwise. |
Delete the current record.
bool Delete(string formatName, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to delete. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if the record was found, false otherwise. |
Delete a record using its relative record number.
bool DeleteByRRN(string formatName, int rrn)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to delete. |
Int32 |
rrn |
Relative record number of the record to delete. |
Returns
Type |
Description |
Boolean |
True if the record found, otherwise false. |
Delete a record using its relative record number.
bool DeleteByRRN(string formatName, decimal rrn)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to delete. |
Decimal |
rrn |
Relative record number of the record to delete. |
Returns
Type |
Description |
Boolean |
True if the record found, otherwise false. |
Delete a range of records.
bool DeleteRange(string formatName, Object[] firstKey, Object[] lastKey, RangeFirst rangeFirstKey, RangeLast rangeLastKey)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to delete. |
Object[] |
firstKey |
Array of key values for the first key. |
Object[] |
lastKey |
Array of key values for the last key. |
RangeFirst |
rangeFirstKey |
Initial include/exclude option. |
RangeLast |
rangeLastKey |
Last include/exclude option. |
Returns
Type |
Description |
Boolean |
True if found, false otherwise. |
Read the next record sequentially.
bool ReadNext(string formatName, bool lockRecord)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to read. |
Boolean |
lockRecord |
True to lock the record after the Read. |
Returns
Type |
Description |
Boolean |
True if End Of File condition is NOT reached, false otherwise. |
Read the next record sequentially, if it has the same key.
bool ReadNextEqual(string formatName, bool lockRecord, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to read. |
Boolean |
lockRecord |
True to lock the record after the Read. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if NOT Eof of File condition reached, false otherwise. |
Read the previous record sequentially.
bool ReadPrevious(string formatName, bool lockRecord)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to read. |
Boolean |
lockRecord |
True to lock the record after the Read. |
Returns
Type |
Description |
Boolean |
True if NOT End of File condition is reached, otherwise false. |
Read the previous record sequentially, if it has the same key.
bool ReadPreviousEqual(string formatName, bool lockRecord, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to read. |
Boolean |
lockRecord |
True to lock the record after the Read. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if NOT End of File condition is reached, otherwise false. |
Read a range of records.
bool ReadRange(string formatName, Object[] firstKey, Object[] lastKey, RangeMode mode, RangeFirst rangeFirstKey, RangeLast rangeLastKey, bool lockRecord)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to read. |
Object[] |
firstKey |
Initial search key collection. |
Object[] |
lastKey |
Last search key collection. |
RangeMode |
mode |
Requested Range mode. |
RangeFirst |
rangeFirstKey |
Initial Exclude/Include option. |
RangeLast |
rangeLastKey |
Last Exclude/Include option. |
Boolean |
lockRecord |
True to lock the record after the Read. |
Returns
Type |
Description |
Boolean |
True if a record was found, false otherwise. |
Positions the file cursor in the record indicated by key.
bool Seek(string formatName, SeekMode mode, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to seek. |
SeekMode |
mode |
Seek mode. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if the record was found, false otherwise. |
Positions the file cursor in the record indicated by relative record number.
bool SeekByRRN(string formatName, SeekMode mode, int rrn)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
Name of the record format to read. |
SeekMode |
mode |
Seek mode. |
Int32 |
rrn |
Relative record number of the record to read. |
Returns
Type |
Description |
Boolean |
True if the record was found, false otherwise. |
Sets the range of records for input operations.
void SetRange(string formatName, Object[] firstKey, Object[] lastKey, RangeMode mode, RangeFirst rangeFirstKey, RangeLast rangeLastKey)
Parameters
Type |
Parameter name |
Description |
String |
formatName |
File format over which this operation will act. |
Object[] |
firstKey |
Array of key values for the first key. |
Object[] |
lastKey |
Array of key values for the last key. |
RangeMode |
mode |
RangeMode value. |
RangeFirst |
rangeFirstKey |
Include/Exclude initial search key option. |
RangeLast |
rangeLastKey |
Include/Exclude last search key option. |