DatabaseFile class | QSYS API Reference Guide
Estimated reading time: 20 minutes
Represents a single format 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 |
AdgKeyTable |
Key |
Gets or sets the main search key. |
AdgKeyTable |
Kez |
Gets or sets the secondary search key, used as the limit for range operations. |
Methods
Signature |
Description |
allocateBuffer() |
Allocates internal objects and constructs the file DataSet. |
Chain(Boolean, Object[]) |
Read a record format using a key. |
Chain(Boolean, IDS, Object[]) |
Read a record format using a key. |
ChainByRRN(Boolean, Int32) |
Read a record by relative record number. |
ChainByRRN(Boolean, Int32, IDS) |
Read a record by relative record number. |
ChainByRRN(Boolean, Decimal) |
Read a record by relative record number. |
ChainByRRN(Boolean, Decimal, IDS) |
Read a record by relative record number. |
Check(Object[]) |
Validate that a record exists. |
Delete() |
Delete the current record. |
Delete(Object[]) |
Delete the current record. |
DeleteByRRN(Int32) |
Delete a record using its relative record number. |
DeleteByRRN(Decimal) |
Delete a record using its relative record number. |
DeleteRange(Object[], Object[], RangeFirst, RangeLast) |
Delete a range of records. |
Feod() |
Force end of data on the current record. |
ReadNext(Boolean) |
Read the next record sequentially. |
ReadNext(Boolean, IDS) |
Read the next record sequentially. |
ReadNextEqual(Boolean, Object[]) |
Read the next record sequentially, if it has the same key. |
ReadNextEqual(Boolean, IDS, Object[]) |
Read the next record sequentially, if it has the same key. |
ReadNextEqualIncompleteKey(Boolean, String, Object[]) |
Read sequentially a record with an incomplete key buffer. |
ReadNextEqualIncompleteKey(Boolean, IDS, String, Object[]) |
Read sequentially a record with an incomplete key buffer. |
ReadPrevious(Boolean) |
Read the previous record sequentially. |
ReadPrevious(Boolean, IDS) |
Read the previous record sequentially. |
ReadPreviousEqual(Boolean, Object[]) |
Read the previous record sequentially, if it has the same key. |
ReadPreviousEqual(Boolean, IDS, Object[]) |
Read the previous record sequentially, if it has the same key. |
ReadPreviousEqualIncompleteKey(Boolean, String, Object[]) |
Read the previous record sequentially, with an incomplete key buffer. |
ReadPreviousEqualIncompleteKey(Boolean, IDS, String, Object[]) |
Read the previous record sequentially, with an incomplete key buffer. |
ReadRange(Object[], Object[], RangeMode, RangeFirst, RangeLast, Boolean) |
Read a range of records. |
Seek(SeekMode, Object[]) |
Positions the file cursor in the record indicated by key. |
SeekByRRN(SeekMode, Int32) |
Positions the file cursor in the record indicated by relative record number. |
SetRange(Object[], Object[], RangeMode, RangeFirst, RangeLast) |
Sets the range of records for input operations. |
Update() |
Update a record. |
Update(IDS) |
Update a record. |
UpdateFlds(String[]) |
Update a record, only those fields listed. |
Write() |
Write a record. |
Write(IDS) |
Write a record. |
AdgDataSet allocateBuffer()
Allocates internal objects and constructs the file DataSet.
AdgDataSet allocateBuffer()
Read a record format using a key.
bool Chain(bool lockRecord, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
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 a key.
bool Chain(bool lockRecord, IDS intoDS, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True to lock the record after the Read. |
IDS |
intoDS |
IDS object that receives the data read. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if the record is found, false otherwise. |
Read a record by relative record number.
bool ChainByRRN(bool lockRecord, int rrn)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True if locking should be performed; false otherwise. |
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 by relative record number.
bool ChainByRRN(bool lockRecord, int rrn, IDS intoDS)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True if locking should be performed; false otherwise. |
Int32 |
rrn |
Relative record number of the record to read. |
IDS |
intoDS |
IDS object that receives the data read. |
Returns
Type |
Description |
Boolean |
True if the record is found, false otherwise. |
Read a record by relative record number.
bool ChainByRRN(bool lockRecord, decimal rrn)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True if locking should be performed; false otherwise. |
Decimal |
rrn |
Relative record number of the record to read. |
Returns
Type |
Description |
Boolean |
True if the record is found, false otherwise. |
Read a record by relative record number.
bool ChainByRRN(bool lockRecord, decimal rrn, IDS intoDS)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True if locking should be performed; false otherwise. |
Decimal |
rrn |
Relative record number of the record to read. |
IDS |
intoDS |
IDS object that receives the data read. |
Returns
Type |
Description |
Boolean |
True if the record is found, false otherwise. |
Validate that a record exists.
bool Check(Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if the record is found, false otherwise. |
bool Delete()
Delete the current record.
Delete the current record.
bool Delete(Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
Object[] |
keyParts |
Input search key collection. |
Returns
Type |
Description |
Boolean |
True if the record is found, false otherwise. |
bool DeleteByRRN(int rrn)
Delete a record using its relative record number.
bool DeleteByRRN(int rrn)
Parameters
Type |
Parameter name |
Description |
Int32 |
rrn |
Relative record number of the record to delete. |
Returns
Type |
Description |
Boolean |
True if the record is found, false otherwise. |
Delete a record using its relative record number.
bool DeleteByRRN(decimal rrn)
Parameters
Type |
Parameter name |
Description |
Decimal |
rrn |
Relative record number of the record to delete. |
Returns
Type |
Description |
Boolean |
True if the record is found, false otherwise. |
Delete a range of records.
bool DeleteRange(Object[] firstKey, Object[] lastKey, RangeFirst rangeFirstKey, RangeLast rangeLastKey)
Parameters
Type |
Parameter name |
Description |
Object[] |
firstKey |
Array of key values for the first key. |
Object[] |
lastKey |
Array of key values for the last key. |
RangeFirst |
rangeFirstKey |
RangeFirst value. |
RangeLast |
rangeLastKey |
RangeLast value. |
Returns
Type |
Description |
Boolean |
True if records were found; false otherwise. |
void Feod()
Force end of data on the current record.
Read the next record sequentially.
bool ReadNext(bool lockRecord)
Parameters
Type |
Parameter name |
Description |
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.
bool ReadNext(bool lockRecord, IDS intoDS)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True to lock the record after the Read. |
IDS |
intoDS |
IDS object that receives the data 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(bool lockRecord, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True to lock the record after the Read. |
Object[] |
keyParts |
Collection of search keys. |
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(bool lockRecord, IDS intoDS, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True to lock the record after the Read. |
IDS |
intoDS |
IDS object that receives the data read. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if End Of File condition is NOT reached, false otherwise. |
Read sequentially a record with an incomplete key buffer.
bool ReadNextEqualIncompleteKey(bool lockRecord, string incompleteKey, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True to lock the record after the Read. |
String |
incompleteKey |
Incomplete search key. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if End Of File condition is NOT reached, false otherwise. |
Read sequentially a record with an incomplete key buffer.
bool ReadNextEqualIncompleteKey(bool lockRecord, IDS intoDS, string incompleteKey, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True to lock the record after the Read. |
IDS |
intoDS |
IDS object that receives the data read. |
String |
incompleteKey |
Incomplete search key. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if End Of File condition is NOT reached, false otherwise. |
Read the previous record sequentially.
bool ReadPrevious(bool lockRecord)
Parameters
Type |
Parameter name |
Description |
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 previous record sequentially.
bool ReadPrevious(bool lockRecord, IDS intoDS)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True to lock the record after the Read. |
IDS |
intoDS |
IDS object that receives the data read. |
Returns
Type |
Description |
Boolean |
True if End Of File condition is NOT reached, false otherwise. |
Read the previous record sequentially, if it has the same key.
bool ReadPreviousEqual(bool lockRecord, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True to lock the record after the Read. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if End Of File condition is NOT reached, false otherwise. |
Read the previous record sequentially, if it has the same key.
bool ReadPreviousEqual(bool lockRecord, IDS intoDS, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True to lock the record after the Read. |
IDS |
intoDS |
IDS object that receives the data read. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if End Of File condition is NOT reached, false otherwise. |
Read the previous record sequentially, with an incomplete key buffer.
bool ReadPreviousEqualIncompleteKey(bool lockRecord, string incompleteKey, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True to lock the record after the Read. |
String |
incompleteKey |
Incomplete search key. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if End Of File condition is NOT reached, false otherwise. |
Read the previous record sequentially, with an incomplete key buffer.
bool ReadPreviousEqualIncompleteKey(bool lockRecord, IDS intoDS, string incompleteKey, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
Boolean |
lockRecord |
True to lock the record after the Read. |
IDS |
intoDS |
IDS object that receives the data read. |
String |
incompleteKey |
Incomplete search key. |
Object[] |
keyParts |
Collection of search keys. |
Returns
Type |
Description |
Boolean |
True if End Of File condition is NOT reached, false otherwise. |
Read a range of records.
bool ReadRange(Object[] firstKey, Object[] lastKey, RangeMode mode, RangeFirst rangeFirstKey, RangeLast rangeLastKey, bool lockRecord)
Parameters
Type |
Parameter name |
Description |
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(SeekMode mode, Object[] keyParts)
Parameters
Type |
Parameter name |
Description |
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(SeekMode mode, int rrn)
Parameters
Type |
Parameter name |
Description |
SeekMode |
mode |
Seek mode. |
Int32 |
rrn |
Relative Record Number. |
Returns
Type |
Description |
Boolean |
True if the record was found, false otherwise. |
Sets the range of records for input operations.
void SetRange(Object[] firstKey, Object[] lastKey, RangeMode mode, RangeFirst rangeFirstKey, RangeLast rangeLastKey)
Parameters
Type |
Parameter name |
Description |
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. |
void Update()
Update a record.
Update a record.
Parameters
Type |
Parameter name |
Description |
IDS |
fromDS |
Update record by copying record data from Data Structure. |
Update a record, only those fields listed.
void UpdateFlds(String[] fields)
Parameters
Type |
Parameter name |
Description |
String[] |
fields |
Collection of record fields. |
void Write()
Write a record.
Write a record.
Parameters
Type |
Parameter name |
Description |
IDS |
fromDS |
IDS object where the data comes from. |