The Btrieve file class. More...
#include <btrieveCpp.h>
Public Member Functions | |
BtrieveFile () | |
~BtrieveFile () | |
Btrieve::StatusCode | BulkCreate (BtrieveBulkCreatePayload *btrieveBulkCreatePayload, BtrieveBulkCreateResult *btrieveBulkCreateResult) |
Bulk create. More... | |
Btrieve::StatusCode | BulkRetrieveNext (BtrieveBulkRetrieveAttributes *bulkRetrieveAttributes, BtrieveBulkRetrieveResult *bulkRetrieveResult, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Retrieve bulk next. More... | |
Btrieve::StatusCode | BulkRetrievePrevious (BtrieveBulkRetrieveAttributes *bulkRetrieveAttributes, BtrieveBulkRetrieveResult *bulkRetrieveResult, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Get bulk previous. More... | |
long long | GetCursorPosition () |
Get the cursor position. More... | |
Btrieve::StatusCode | GetInformation (BtrieveFileInformation *btrieveFileInformation) |
Get the file information. More... | |
Btrieve::StatusCode | GetLastStatusCode () |
Get the last status code. More... | |
int | GetNumerator (long long cursorPosition, int denominator) |
Get the numerator which best approximates the location of the cursor position within the file relative to the denominator. More... | |
int | GetNumerator (Btrieve::Index index, const char *key, int keyLength, int denominator) |
Get the numerator which best approximates the location of the key within the index relative to the denominator. More... | |
int | GetPercentage (long long cursorPosition) |
Get the percentage which best approximates the location of the cursor position within the file. More... | |
int | GetPercentage (Btrieve::Index index, const char *key, int keyLength) |
Get the percentage which best approximates the location of the key within the given index. More... | |
Btrieve::StatusCode | IndexCreate (BtrieveIndexAttributes *btrieveIndexAttributes) |
Create an index. More... | |
Btrieve::StatusCode | IndexDrop (Btrieve::Index index) |
Drop an index. More... | |
Btrieve::StatusCode | KeyRetrieve (Btrieve::Comparison comparison, Btrieve::Index index, const char *key, int keyLength) |
Retrieve a key using the given comparison, index, and key. More... | |
Btrieve::StatusCode | KeyRetrieveFirst (Btrieve::Index index, char *key, int keySize) |
Retrieve the first key. More... | |
Btrieve::StatusCode | KeyRetrieveLast (Btrieve::Index index, char *key, int keySize) |
Retrieve the last key. More... | |
Btrieve::StatusCode | KeyRetrieveNext (char *key, int keySize) |
Retrieve the next key. More... | |
Btrieve::StatusCode | KeyRetrievePrevious (char *key, int keySize) |
Retrieve the previous key. More... | |
Btrieve::StatusCode | RecordAppendChunk (const char *chunk, int chunkLength) |
Append a record chunk. More... | |
Btrieve::StatusCode | RecordCreate (char *record, int recordLength) |
Create a record. More... | |
Btrieve::StatusCode | RecordDelete () |
Delete a record. More... | |
int | RecordRetrieve (Btrieve::Comparison comparison, Btrieve::Index index, const char *key, int keyLength, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Retrieve a record using the given comparison, index, and key. More... | |
int | RecordRetrieveByCursorPosition (Btrieve::Index index, long long cursorPosition, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Retrieve a record by cursor position. More... | |
int | RecordRetrieveByFraction (Btrieve::Index index, int numerator, int denominator, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Retrieve a record by fraction. More... | |
int | RecordRetrieveByPercentage (Btrieve::Index index, int percentage, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Retrieve a record by percentage. More... | |
int | RecordRetrieveChunk (int offset, int length, char *chunk, int chunkSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Retrieve a record chunk. More... | |
int | RecordRetrieveChunk (int length, char *chunk, int chunkSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Retrieve a record chunk at the current offset. More... | |
int | RecordRetrieveFirst (Btrieve::Index index, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Retrieve the first record. More... | |
int | RecordRetrieveLast (Btrieve::Index index, char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Retrieve the last record. More... | |
int | RecordRetrieveNext (char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Retrieve the next record. More... | |
int | RecordRetrievePrevious (char *record, int recordSize, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE) |
Retrieve the previous record. More... | |
Btrieve::StatusCode | RecordTruncate (int offset) |
Truncate a record. More... | |
Btrieve::StatusCode | RecordTruncate () |
Truncate a record at the current offset. More... | |
Btrieve::StatusCode | RecordUnlock (Btrieve::UnlockMode unlockMode) |
Unlock a record or records. More... | |
Btrieve::StatusCode | RecordUpdate (const char *record, int recordLength) |
Update a record. More... | |
Btrieve::StatusCode | RecordUpdateChunk (int offset, const char *chunk, int chunkLength) |
Update a record chunk. More... | |
Btrieve::StatusCode | RecordUpdateChunk (const char *chunk, int chunkLength) |
Update a record chunk at the current offset. More... | |
Btrieve::StatusCode | SetOwner (Btrieve::OwnerMode ownerMode, const char *ownerName=NULL, const char *ownerNameAgain=NULL, bool useLongOwnerName=true) |
Set the owner. More... | |
Btrieve::StatusCode | UnlockCursorPosition (long long cursorPosition) |
Unlock the cursor position. More... | |
The Btrieve file class.
In order to retrieve, update, and delete records in a Btrieve file the cursor must be established. The following methods are among those used to establish the cursor:
Once established, the cursor enables traversal over the records in the file. The following methods are among those used to traverse over the file:
The cursor may be re-established repeatedly.
BtrieveFile::BtrieveFile | ( | ) |
BtrieveFile::~BtrieveFile | ( | ) |
Btrieve::StatusCode BtrieveFile::BulkCreate | ( | BtrieveBulkCreatePayload * | btrieveBulkCreatePayload, |
BtrieveBulkCreateResult * | btrieveBulkCreateResult | ||
) |
Bulk create.
[in] | btrieveBulkCreatePayload | The bulk create payload. |
[out] | btrieveBulkCreateResult | The bulk create result. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::BulkRetrieveNext | ( | BtrieveBulkRetrieveAttributes * | bulkRetrieveAttributes, |
BtrieveBulkRetrieveResult * | bulkRetrieveResult, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Retrieve bulk next.
[in] | bulkRetrieveAttributes | The bulk retrieve attributes. |
[out] | bulkRetrieveResult | The bulk retrieve result. |
[in] | lockMode | The lock mode. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::BulkRetrievePrevious | ( | BtrieveBulkRetrieveAttributes * | bulkRetrieveAttributes, |
BtrieveBulkRetrieveResult * | bulkRetrieveResult, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Get bulk previous.
[in] | bulkRetrieveAttributes | The bulk retrieve attributes. |
[out] | bulkRetrieveResult | The bulk retrieve result. |
[in] | lockMode | The lock mode. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
long long BtrieveFile::GetCursorPosition | ( | ) |
Get the cursor position.
>= 0 | The cursor position. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
Btrieve::StatusCode BtrieveFile::GetInformation | ( | BtrieveFileInformation * | btrieveFileInformation | ) |
Get the file information.
[out] | btrieveFileInformation | The file information. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::GetLastStatusCode | ( | ) |
Get the last status code.
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
int BtrieveFile::GetNumerator | ( | long long | cursorPosition, |
int | denominator | ||
) |
Get the numerator which best approximates the location of the cursor position within the file relative to the denominator.
[in] | cursorPosition | The cursor position. |
[in] | denominator | The denominator. |
>= 0 | The numerator returned as 0 through denominator. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::GetNumerator | ( | Btrieve::Index | index, |
const char * | key, | ||
int | keyLength, | ||
int | denominator | ||
) |
Get the numerator which best approximates the location of the key within the index relative to the denominator.
[in] | index | The index. |
[in] | key | The key. |
[in] | keyLength | The key length. |
[in] | denominator | The denominator. |
>= 0 | The numerator returned as 0 through denominator. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::GetPercentage | ( | long long | cursorPosition | ) |
Get the percentage which best approximates the location of the cursor position within the file.
[in] | cursorPosition | The cursor position. |
>= 0 | The percentage returned as 0 through 10,000, corresponding to 0% through 100.00%. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::GetPercentage | ( | Btrieve::Index | index, |
const char * | key, | ||
int | keyLength | ||
) |
Get the percentage which best approximates the location of the key within the given index.
[in] | index | The index. |
[in] | key | The key. |
[in] | keyLength | The key length. |
>= 0 | The percentage returned as 0 through 10,000, corresponding to 0% through 100.00%. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
Btrieve::StatusCode BtrieveFile::IndexCreate | ( | BtrieveIndexAttributes * | btrieveIndexAttributes | ) |
Create an index.
[in] | btrieveIndexAttributes | The index attributes. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::IndexDrop | ( | Btrieve::Index | index | ) |
Drop an index.
[in] | index | The index. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::KeyRetrieve | ( | Btrieve::Comparison | comparison, |
Btrieve::Index | index, | ||
const char * | key, | ||
int | keyLength | ||
) |
Retrieve a key using the given comparison, index, and key.
[in] | comparison | The comparison. Btrieve::COMPARISON_NOT_EQUAL isn't supported. |
[in] | index | The index. |
[in] | key | The key. |
[in] | keyLength | The key length. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::KeyRetrieveFirst | ( | Btrieve::Index | index, |
char * | key, | ||
int | keySize | ||
) |
Retrieve the first key.
[in] | index | The index. |
[out] | key | The key. |
[in] | keySize | The key size. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::KeyRetrieveLast | ( | Btrieve::Index | index, |
char * | key, | ||
int | keySize | ||
) |
Retrieve the last key.
[in] | index | The index. |
[out] | key | The key. |
[in] | keySize | The key size. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::KeyRetrieveNext | ( | char * | key, |
int | keySize | ||
) |
Retrieve the next key.
[out] | key | The key. |
[in] | keySize | The key size. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::KeyRetrievePrevious | ( | char * | key, |
int | keySize | ||
) |
Retrieve the previous key.
[out] | key | The key. |
[in] | keySize | The key size. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::RecordAppendChunk | ( | const char * | chunk, |
int | chunkLength | ||
) |
Append a record chunk.
[in] | chunk | The chunk. |
[in] | chunkLength | The chunk length. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::RecordCreate | ( | char * | record, |
int | recordLength | ||
) |
Create a record.
[in,out] | record | The record. If the current record contains a Btrieve::DATA_TYPE_AUTOINCREMENT or Btrieve::DATA_TYPE_AUTOTIMESTAMP key segment then the passed in record may be modifed. |
[in] | recordLength | The record length. Record length is limited to Btrieve::MAXIMUM_RECORD_LENGTH. See BtrieveFile::RecordAppendChunk for creating records greater than Btrieve::MAXIMUM_RECORD_LENGTH in length. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::RecordDelete | ( | ) |
Delete a record.
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
int BtrieveFile::RecordRetrieve | ( | Btrieve::Comparison | comparison, |
Btrieve::Index | index, | ||
const char * | key, | ||
int | keyLength, | ||
char * | record, | ||
int | recordSize, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Retrieve a record using the given comparison, index, and key.
[in] | comparison | The comparison. Btrieve::COMPARISON_NOT_EQUAL isn't supported. |
[in] | index | The index. |
[in] | key | The key. |
[in] | keyLength | The key length. |
[out] | record | The record. |
[in] | recordSize | The record size. |
[in] | lockMode | The lock mode. |
>= 0 | The number of bytes read. The number of bytes read is limited to Btrieve::MAXIMUM_RECORD_LENGTH. See BtrieveFile::RecordRetrieveChunk for retrieving records greater than Btrieve::MAXIMUM_RECORD_LENGTH in length. If the record size requested is less than the length of the current record then BtrieveFile::GetLastStatusCode will return Btrieve::STATUS_CODE_DATALENGTH_ERROR. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::RecordRetrieveByCursorPosition | ( | Btrieve::Index | index, |
long long | cursorPosition, | ||
char * | record, | ||
int | recordSize, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Retrieve a record by cursor position.
[in] | index | An index or Btrieve::INDEX_NONE. |
[in] | cursorPosition | The cursor position. |
[out] | record | The record. |
[in] | recordSize | The record size. |
[in] | lockMode | The lock mode. |
>= 0 | The number of bytes read. The number of bytes read is limited to Btrieve::MAXIMUM_RECORD_LENGTH. See BtrieveFile::RecordRetrieveChunk for retrieving records greater than Btrieve::MAXIMUM_RECORD_LENGTH in length. If the record size requested is less than the length of the current record then BtrieveFile::GetLastStatusCode will return Btrieve::STATUS_CODE_DATALENGTH_ERROR. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::RecordRetrieveByFraction | ( | Btrieve::Index | index, |
int | numerator, | ||
int | denominator, | ||
char * | record, | ||
int | recordSize, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Retrieve a record by fraction.
[in] | index | An index or Btrieve::INDEX_NONE. |
[in] | numerator | The numerator given as 0 through denominator. |
[in] | denominator | The denominator. |
[out] | record | The record. |
[in] | recordSize | The record size. |
[in] | lockMode | The lock mode. |
>= 0 | The number of bytes read. The number of bytes read is limited to Btrieve::MAXIMUM_RECORD_LENGTH. See BtrieveFile::RecordRetrieveChunk for retrieving records greater than Btrieve::MAXIMUM_RECORD_LENGTH in length. If the record size requested is less than the length of the current record then BtrieveFile::GetLastStatusCode will return Btrieve::STATUS_CODE_DATALENGTH_ERROR. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::RecordRetrieveByPercentage | ( | Btrieve::Index | index, |
int | percentage, | ||
char * | record, | ||
int | recordSize, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Retrieve a record by percentage.
[in] | index | An index or Btrieve::INDEX_NONE. |
[in] | percentage | The percentage given as 0 through 10,000, corresponding to 0% through 100.00%. |
[out] | record | The record. |
[in] | recordSize | The record size. |
[in] | lockMode | The lock mode. |
>= 0 | The number of bytes read. The number of bytes read is limited to Btrieve::MAXIMUM_RECORD_LENGTH. See BtrieveFile::RecordRetrieveChunk for retrieving records greater than Btrieve::MAXIMUM_RECORD_LENGTH in length. If the record size requested is less than the length of the current record then BtrieveFile::GetLastStatusCode will return Btrieve::STATUS_CODE_DATALENGTH_ERROR. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::RecordRetrieveChunk | ( | int | offset, |
int | length, | ||
char * | chunk, | ||
int | chunkSize, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Retrieve a record chunk.
[in] | offset | The offset. |
[in] | length | The length. |
[out] | chunk | The chunk. |
[in] | chunkSize | The chunk size. |
[in] | lockMode | The lock mode. |
>= 0 | The number of bytes read. You may retrieve multiple chunks. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::RecordRetrieveChunk | ( | int | length, |
char * | chunk, | ||
int | chunkSize, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Retrieve a record chunk at the current offset.
[in] | length | The length. |
[out] | chunk | The chunk. |
[in] | chunkSize | The chunk size. |
[in] | lockMode | The lock mode. |
>= 0 | The number of bytes read. You may retrieve multiple chunks. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::RecordRetrieveFirst | ( | Btrieve::Index | index, |
char * | record, | ||
int | recordSize, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Retrieve the first record.
[in] | index | An index or Btrieve::INDEX_NONE. |
[out] | record | The record. |
[in] | recordSize | The record size. |
[in] | lockMode | The lock mode. |
>= 0 | The number of bytes read. The number of bytes read is limited to Btrieve::MAXIMUM_RECORD_LENGTH. See BtrieveFile::RecordRetrieveChunk for retrieving records greater than Btrieve::MAXIMUM_RECORD_LENGTH in length. If the record size requested is less than the length of the current record then BtrieveFile::GetLastStatusCode will return Btrieve::STATUS_CODE_DATALENGTH_ERROR. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::RecordRetrieveLast | ( | Btrieve::Index | index, |
char * | record, | ||
int | recordSize, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Retrieve the last record.
[in] | index | An index or Btrieve::INDEX_NONE. |
[out] | record | The record. |
[in] | recordSize | The record size. |
[in] | lockMode | The lock mode. |
>= 0 | The number of bytes read. The number of bytes read is limited to Btrieve::MAXIMUM_RECORD_LENGTH. See BtrieveFile::RecordRetrieveChunk for retrieving records greater than Btrieve::MAXIMUM_RECORD_LENGTH in length. If the record size requested is less than the length of the current record then BtrieveFile::GetLastStatusCode will return Btrieve::STATUS_CODE_DATALENGTH_ERROR. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::RecordRetrieveNext | ( | char * | record, |
int | recordSize, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Retrieve the next record.
[out] | record | The record. |
[in] | recordSize | The record size. |
[in] | lockMode | The lock mode. |
>= 0 | The number of bytes read. The number of bytes read is limited to Btrieve::MAXIMUM_RECORD_LENGTH. See BtrieveFile::RecordRetrieveChunk for retrieving records greater than Btrieve::MAXIMUM_RECORD_LENGTH in length. If the record size requested is less than the length of the current record then BtrieveFile::GetLastStatusCode will return Btrieve::STATUS_CODE_DATALENGTH_ERROR. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
int BtrieveFile::RecordRetrievePrevious | ( | char * | record, |
int | recordSize, | ||
Btrieve::LockMode | lockMode = Btrieve::LOCK_MODE_NONE |
||
) |
Retrieve the previous record.
[out] | record | The record. |
[in] | recordSize | The record size. |
[in] | lockMode | The lock mode. |
>= 0 | The number of bytes read. The number of bytes read is limited to Btrieve::MAXIMUM_RECORD_LENGTH. See BtrieveFile::RecordRetrieveChunk for retrieving records greater than Btrieve::MAXIMUM_RECORD_LENGTH in length. If the record size requested is less than the length of the current record then BtrieveFile::GetLastStatusCode will return Btrieve::STATUS_CODE_DATALENGTH_ERROR. |
-1 | An error has occurred. Use BtrieveFile::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error. |
Btrieve::StatusCode BtrieveFile::RecordTruncate | ( | int | offset | ) |
Truncate a record.
[in] | offset | The offset. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::RecordTruncate | ( | ) |
Truncate a record at the current offset.
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::RecordUnlock | ( | Btrieve::UnlockMode | unlockMode | ) |
Unlock a record or records.
[in] | unlockMode | The unlock mode. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::RecordUpdate | ( | const char * | record, |
int | recordLength | ||
) |
Update a record.
[in] | record | The record. |
[in] | recordLength | The record length. Record length is limited to Btrieve::MAXIMUM_RECORD_LENGTH. See BtrieveFile::RecordUpdateChunk for updating records greater than Btrieve::MAXIMUM_RECORD_LENGTH in length. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::RecordUpdateChunk | ( | int | offset, |
const char * | chunk, | ||
int | chunkLength | ||
) |
Update a record chunk.
[in] | offset | The offset. |
[in] | chunk | The chunk. |
[in] | chunkLength | The chunk length. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::RecordUpdateChunk | ( | const char * | chunk, |
int | chunkLength | ||
) |
Update a record chunk at the current offset.
[in] | chunk | The chunk. |
[in] | chunkLength | The chunk length. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::SetOwner | ( | Btrieve::OwnerMode | ownerMode, |
const char * | ownerName = NULL , |
||
const char * | ownerNameAgain = NULL , |
||
bool | useLongOwnerName = true |
||
) |
Set the owner.
[in] | ownerMode | The owner mode. |
[in] | ownerName | The owner name. |
[in] | ownerNameAgain | The owner name (again). |
[in] | useLongOwnerName | Use a long owner name? |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
Btrieve::StatusCode BtrieveFile::UnlockCursorPosition | ( | long long | cursorPosition | ) |
Unlock the cursor position.
[in] | cursorPosition | The cursor position. |
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |