The Btrieve file attributes class.
More...
#include <btrieveCpp.h>
The Btrieve file attributes class.
- Examples
- Test_BTRV2.cpp, bfileattributes.cpp, bfilter.cpp, bindexattributes.cpp, bkeyonly.cpp, block.cpp, bpercentage.cpp, btest.cpp, btestappend.cpp, btestbulk.cpp, btestchunk.cpp, and btestvlr.cpp.
◆ BtrieveFileAttributes()
BtrieveFileAttributes::BtrieveFileAttributes |
( |
| ) |
|
- Snippet
- C++ btest.cpp Python btest.py
btrieveFileAttributes = btrievePython.BtrieveFileAttributes()
assert(btrieveFileAttributes != None)
◆ ~BtrieveFileAttributes()
BtrieveFileAttributes::~BtrieveFileAttributes |
( |
| ) |
|
◆ SetBalancedIndexes()
Set balanced indexes.
- Parameters
-
[in] | enableBalancedIndexes | Enable balanced indexes? |
- Description
- Balanced indexes are disabled by default.
- Snippet
- C++ bfileattributes.cpp Python bfileattributes.py
rc = btrieveFileAttributes.SetBalancedIndexes(True)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveFileAttributes::SetBalancedIndexes():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
- Return values
-
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
- See also
- Btrieve::StatusCodeToString
- Examples
- bfileattributes.cpp.
◆ SetFileVersion()
◆ SetFixedRecordLength()
Set the fixed record length.
- Parameters
-
- Description
- Fixed record length defaults to zero.
- Snippet
- C++ btest.cpp Python btest.py
rc = btrieveFileAttributes.SetFixedRecordLength(recordLength)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveFileAttributes::SetFixedRecordLength():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
- Return values
-
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
- See also
- Btrieve::StatusCodeToString
- Examples
- Test_BTRV2.cpp, bfileattributes.cpp, bfilter.cpp, bindexattributes.cpp, bkeyonly.cpp, block.cpp, bpercentage.cpp, btest.cpp, btestappend.cpp, btestbulk.cpp, btestchunk.cpp, and btestvlr.cpp.
◆ SetFreeSpaceThreshold()
Set the free space threshold.
- Parameters
-
[in] | freeSpaceThreshold | The free space threshold. |
- Description
- Free space threshold defaults to Btrieve::FREE_SPACE_THRESHOLD_DEFAULT. The free space threshold setting is ignored unless variable length records are enabled.
- Snippet
- C++ bfileattributes.cpp Python bfileattributes.py
rc = btrieveFileAttributes.SetFreeSpaceThreshold(btrievePython.Btrieve.FREE_SPACE_THRESHOLD_10_PERCENT)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveFileAttributes::SetFreeSpaceThreshold():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
- Return values
-
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
- See also
- Btrieve::StatusCodeToString
- Examples
- bfileattributes.cpp.
◆ SetKeyOnly()
Set key only.
- Parameters
-
[in] | enableKeyOnly | Enable key only? |
- Description
- Key only is disabled by default. Enabling key only will cause the system data mode to be ignored.
- Snippet
- C++ bkeyonly.cpp Python bkeyonly.py
rc = btrieveFileAttributes.SetKeyOnly(True)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveFileAttributes::SetKeyOnly():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
- Return values
-
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
- See also
- Btrieve::StatusCodeToString
- Examples
- bkeyonly.cpp.
◆ SetPageSize()
Set the page size.
- Parameters
-
[in] | pageSize | The page size. |
[in] | enablePageCompression | Enable page compression? |
- Description
- Page size defaults to Btrieve::PAGE_SIZE_4096. Page compression is disabled by default and requires file version Btrieve::FILE_VERSION_9_5 or greater. Not all page sizes are valid for all file versions. Pages sizes greater than 4096 require file version Btrieve::FILE_VERSION_9_0 or greater. Pages sizes which are unsupported for a particular file version will be rounded up to the next supported size.
- Snippet
- C++ bfileattributes.cpp Python bfileattributes.py
rc = btrieveFileAttributes.SetPageSize(btrievePython.Btrieve.PAGE_SIZE_16384)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveFileAttributes::SetPageSize():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
- Return values
-
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
- See also
- Btrieve::StatusCodeToString
- Examples
- bfileattributes.cpp.
◆ SetPreallocatedPageCount()
Btrieve::StatusCode BtrieveFileAttributes::SetPreallocatedPageCount |
( |
int | preallocatedPageCount | ) |
|
Set the preallocated page count.
- Parameters
-
[in] | preallocatedPageCount | The preallocated page count. The preallocated page count must be between 0 and 65535, inclusive. |
- Description
- Preallocated page count defaults to zero.
- Snippet
- C++ bfileattributes.cpp Python bfileattributes.py
rc = btrieveFileAttributes.SetPreallocatedPageCount(64 * 1024 - 1)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveFileAttributes::SetPreallocatedPageCount():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
- Return values
-
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
- See also
- Btrieve::StatusCodeToString
- Examples
- bfileattributes.cpp.
◆ SetRecordCompressionMode()
Set record compression mode.
- Parameters
-
[in] | recordCompressionMode | The record compression mode. |
- Description
- Record compression defaults to Btrieve::RECORD_COMPRESSION_MODE_NONE. Compression mode blank truncation requires variable length records be enabled.
- Snippet
- C++ bfileattributes.cpp Python bfileattributes.py
rc = btrieveFileAttributes.SetRecordCompressionMode(btrievePython.Btrieve.RECORD_COMPRESSION_MODE_RUN_LENGTH_ENCODING)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveFileAttributes::SetRecordCompressionMode():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
- Return values
-
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
- See also
- Btrieve::StatusCodeToString
- Examples
- bfileattributes.cpp.
◆ SetReservedDuplicatePointerCount()
Btrieve::StatusCode BtrieveFileAttributes::SetReservedDuplicatePointerCount |
( |
int | reservedDuplicatePointerCount | ) |
|
Set the reserved duplicate pointer count.
- Parameters
-
[in] | reservedDuplicatePointerCount | The reserved duplicate pointer count. The reserved duplicate pointer count must be between 0 and 119, inclusive. |
- Description
- Reserved duplicate pointer count defaults to zero. The maximum reserved duplicate pointer count may be less than 119 depending on file version and page size. For example, a file version of Btrieve::FILE_VERSION_9_0 and page size of Btrieve::PAGE_SIZE_3584 allows for a maximum reserved duplicate pointer count of 54.
- Snippet
- C++ bfileattributes.cpp Python bfileattributes.py
rc = btrieveFileAttributes.SetReservedDuplicatePointerCount(119)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveFileAttributes::SetReservedDuplicatePointerCount():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
- Return values
-
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
- See also
- Btrieve::StatusCodeToString
- Examples
- bfileattributes.cpp.
◆ SetSystemDataMode()
Set the system data mode.
- Parameters
-
[in] | systemDataMode | The system data mode. |
- Description
- System data mode defaults to Btrieve::SYSTEM_DATA_MODE_DEFAULT.
- Snippet
- C++ bfileattributes.cpp Python bfileattributes.py
rc = btrieveFileAttributes.SetSystemDataMode(btrievePython.Btrieve.SYSTEM_DATA_MODE_NO)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveFileAttributes::SetSystemDataMode():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
- Return values
-
= Btrieve::STATUS_CODE_NO_ERROR | Success. |
!= Btrieve::STATUS_CODE_NO_ERROR | An error has occurred. |
- See also
- Btrieve::StatusCodeToString
- Examples
- bfileattributes.cpp.
◆ SetVariableLengthRecordsMode()