This is an example of file information use written in C++.
#include <stdio.h>
{
{
goto leave;
}
leave:
return status;
}
{
{
goto leave;
}
leave:
return status;
}
{
const char *c;
int i;
int indexCount;
int segmentCount;
long long cursorPosition;
long long recordCount;
long long uniqueValueCount;
{
goto leave;
}
{
goto leave;
}
printf("BalancedIndexes = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("ClientTransactions = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetDuplicateRecordConflictCursorPosition():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("DuplicateRecordConflictCursorPosition = %lld\n", cursorPosition);
{
goto leave;
}
{
goto leave;
}
printf("ContinuousOperation = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("ExplicitLocks = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("FixedRecordLength = %d\n", i);
{
goto leave;
}
{
goto leave;
}
printf("GatewayMajorVersion = %d\n", i);
{
goto leave;
}
printf("GatewayMinorVersion = %d\n", i);
{
goto leave;
}
printf("GatewayName = %s\n", c);
{
goto leave;
}
printf("GatewayPatchLevel = %d\n", i);
{
goto leave;
}
printf("GatewayPlatform = %d\n", i);
{
goto leave;
}
printf("HandleCount = %d\n", i);
{
goto leave;
}
printf("Identifier = %d\n", i);
{
goto leave;
}
printf("IndexCount = %d\n", indexCount);
if ((i = btrieveFileInformation.
GetKeyOnly()) < 0)
{
goto leave;
}
printf("KeyOnly = %s\n", i > 0 ? "Yes" : "No");
for (int keySegmentNumber = 1, indexNumber = 0; indexNumber < indexCount; keySegmentNumber++)
{
{
goto leave;
}
printf("KeySegmentNumber = %d\n", keySegmentNumber);
{
goto leave;
}
{
goto leave;
}
printf("\tACSNumber = %d\n", i);
{
goto leave;
}
{
goto leave;
}
printf("\tDescendingSortOrder = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
printf("\tKeyContinues = %s\n", i > 0 ? "Yes" : "No");
if (i == 0)
{
indexNumber++;
}
{
goto leave;
}
printf("\tLength = %d\n", i);
{
goto leave;
}
printf("\tModifiable = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("\tNullValue = %d\n", i);
{
goto leave;
}
printf("\tOffset = %d\n", i);
{
goto leave;
}
printf("\tUniqueValueCount = %lld\n", uniqueValueCount);
}
{
goto leave;
}
printf("LockOwnerClientIdentifier = %d\n", i);
{
goto leave;
}
{
goto leave;
}
printf("LockOwnerFileLock = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("LockOwnerImplicitLock = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("LockOwnerName = %s\n", c);
{
goto leave;
}
{
goto leave;
}
printf("LockOwnerRecordLock = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("LockOwnerSameProcess = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("LockOwnerServiceAgentIdentifier = %d\n", i);
{
goto leave;
}
printf("LockOwnerTimeInTransaction = %d\n", i);
{
goto leave;
}
printf("LockOwnerTransactionLevel = %d\n", i);
{
goto leave;
}
printf("LockOwnerWriteHold = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("LockOwnerWriteNoWait = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("Loggable = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("OpenTimestamp = %d\n", i);
{
goto leave;
}
{
goto leave;
}
printf("PageCompression = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("PagePreallocation = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("ReadOnly = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
{
goto leave;
}
printf("RecordCount = %lld\n", recordCount);
{
goto leave;
}
printf("ReferentialIntegrityConstraints = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetReferentialIntegrityCursorPosition():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("ReferentialIntegrityCursorPosition = %lld\n", cursorPosition);
{
goto leave;
}
printf("ReferentialIntegrityFileName = %s\n", c);
{
goto leave;
}
printf("ReferentialIntegrityOperationCode = %d\n", i);
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseAuthenticationByDatabase():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseAuthenticationByDatabase = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseAuthorizationByDatabase():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseAuthorizationByDatabase = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseBtpasswd = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseExplicit = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseImplicit = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseName = %s\n", c);
{
goto leave;
}
printf("SecurityCurrentDatabasePAM = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseRTSSComplete():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseRTSSComplete = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseRTSSDisabled():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseRTSSDisabled = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseRTSSPreauthorized():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseRTSSPreauthorized = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseTrusted = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityCurrentDatabaseWindowsNamedPipe():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityCurrentDatabaseWindowsNamedPipe = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentDatabaseWorkgroup = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityCurrentUserName = %s\n", c);
{
printf(
"Error: BtrieveFileInformation::GetSecurityHandleAuthenticationByDatabase():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityHandleAuthenticationByDatabase = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityHandleAuthorizationByDatabase():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityHandleAuthorizationByDatabase = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleBtpasswd = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleDatabaseName = %s\n", c);
{
goto leave;
}
printf("SecurityHandleExplicit = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleImplicit = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandlePAM = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleRTSSComplete = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleRTSSDisabled = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleRTSSPreauthorized = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleTableName = %s\n", c);
{
goto leave;
}
printf("SecurityHandleTrusted = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleUserName = %s\n", c);
{
goto leave;
}
printf("SecurityHandleWindowsNamedPipe = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityHandleWorkgroup = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionAlter = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionCreateFile = %s\n", i > 0 ? "Yes" : "No");
{
printf(
"Error: BtrieveFileInformation::GetSecurityPermissionCreateStoredProcedure():%d:%s.\n", status,
Btrieve::StatusCodeToString(status));
goto leave;
}
printf("SecurityPermissionCreateStoredProcedure = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionCreateView = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionDelete = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionExecute = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionCreateRecord = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionNoRights = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionOpen = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionRead = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionRefer = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SecurityPermissionUpdate = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("Segmented = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SegmentCount = %d\n", segmentCount);
for (i = 1; i <= segmentCount; i++)
{
{
goto leave;
}
printf("SegmentFileName = %s\n", c);
}
{
goto leave;
}
{
goto leave;
}
printf("SystemIndexPresent = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SystemIndexSize = %d\n", i);
{
goto leave;
}
printf("SystemIndexUsed = %s\n", i > 0 ? "Yes" : "No");
{
goto leave;
}
printf("SystemIndexVersion = %d\n", i);
{
goto leave;
}
printf("UnusedDuplicatePointerCount = %d\n", i);
{
goto leave;
}
printf("UnusedPageCount = %d\n", i);
{
goto leave;
}
printf("UsageCount = %d\n", i);
{
goto leave;
}
{
goto leave;
}
printf("WrongOwner = %s\n", i > 0 ? "Yes" : "No");
leave:
return status;
}
int
main(int argc, char *argv[])
{
static const char *usage = "Usage: %s btrieveFileName\n";
char *btrieveFileName;
if (argc != 2)
{
printf(usage, argv[0]);
goto leave;
}
btrieveFileName = argv[1];
{
goto leave;
}
{
goto leave;
}
{
goto leave;
}
leave:
return 0;
return 1;
}
The Btrieve client class.
Definition btrieveCpp.h:1388
Btrieve::StatusCode FileClose(BtrieveFile *btrieveFile)
Close a file.
Btrieve::StatusCode FileOpen(BtrieveFile *btrieveFile, const char *fileName, const char *ownerName, Btrieve::OpenMode openMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
Open a file.
The Btrieve file class.
Definition btrieveCpp.h:1729
Btrieve::StatusCode GetInformation(BtrieveFileInformation *btrieveFileInformation)
Get the file information.
The Btrieve key segment class.
Definition btrieveCpp.h:3874
Btrieve::DuplicateMode GetDuplicateMode()
Get the duplicate mode.
int GetLength()
Get the length.
int GetOffset()
Get the offset.
long long GetUniqueValueCount()
Get the unique value count.
Btrieve::StatusCode GetLastStatusCode()
Get the last status code.
Btrieve::DataType GetDataType()
Get the data type.
int GetACSNumber()
Get the alternate collation sequence number.
Btrieve::NullKeyMode GetNullKeyMode()
Get the null key mode.
int GetKeyContinues()
Get key continues.
Btrieve::Index GetIndex()
Get the index.
int GetModifiable()
Get modifiable.
int GetNullValue()
Get the null value.
int GetDescendingSortOrder()
Get descending sort order.
Btrieve::ACSMode GetACSMode()
Get the alternate collation sequence mode.
VariableLengthRecordsMode
The Btrieve variable length records modes.
Definition btrieveCpp.h:1239
@ VARIABLE_LENGTH_RECORDS_MODE_UNKNOWN
Unknown.
Definition btrieveCpp.h:1247
static const char * PageSizeToString(PageSize pageSize)
Return a page size as a string.
static const char * FreeSpaceThresholdToString(FreeSpaceThreshold freeSpaceThreshold)
Return a free space threshold as a string.
static const char * VariableLengthRecordsModeToString(VariableLengthRecordsMode variableLengthRecordsMode)
Return a variable length records mode as a string.
static const char * RecordCompressionModeToString(RecordCompressionMode recordCompressionMode)
Return an record compression mode as a string.
SystemDataMode
The Btrieve system data modes.
Definition btrieveCpp.h:1200
@ SYSTEM_DATA_MODE_UNKNOWN
Unknown.
Definition btrieveCpp.h:1210
FileVersion
The Btrieve file versions.
Definition btrieveCpp.h:267
@ FILE_VERSION_UNKNOWN
Unknown.
Definition btrieveCpp.h:287
static const char * ACSModeToString(ACSMode ACSMode)
Return an alternate collation sequence mode as a string.
static const char * StatusCodeToString(StatusCode statusCode)
Return a status code as a string.
static const char * NullKeyModeToString(NullKeyMode nullKeyMode)
Return a null key mode as a string.
PageLockType
The Btrieve page lock type.
Definition btrieveCpp.h:655
@ PAGE_LOCK_TYPE_UNKNOWN
Unknown.
Definition btrieveCpp.h:665
LockMode
The Btrieve lock modes.
Definition btrieveCpp.h:573
@ LOCK_MODE_UNKNOWN
Unknown.
Definition btrieveCpp.h:585
static const char * OwnerModeToString(OwnerMode ownerMode)
Return an owner mode as a string.
PageSize
The Btrieve page sizes.
Definition btrieveCpp.h:671
@ PAGE_SIZE_UNKNOWN
Unknown.
Definition btrieveCpp.h:693
StatusCode
The Btrieve status codes.
Definition btrieveCpp.h:713
@ STATUS_CODE_UNKNOWN
-7 - Unknown.
Definition btrieveCpp.h:1194
@ STATUS_CODE_NO_ERROR
0 - No error.
Definition btrieveCpp.h:715
static const char * SystemDataModeToString(SystemDataMode systemDataMode)
Return a system data mode as a string.
static const char * DuplicateModeToString(DuplicateMode duplicateMode)
Return a duplicate mode as a string.
DuplicateMode
The Btrieve duplicate modes.
Definition btrieveCpp.h:183
@ DUPLICATE_MODE_UNKNOWN
Unknown.
Definition btrieveCpp.h:191
FreeSpaceThreshold
The Btrieve free space thresholds.
Definition btrieveCpp.h:293
@ FREE_SPACE_THRESHOLD_UNKNOWN
Unknown.
Definition btrieveCpp.h:303
NullKeyMode
The Btrieve null key modes.
Definition btrieveCpp.h:591
@ NULL_KEY_MODE_UNKNOWN
Unknown.
Definition btrieveCpp.h:599
@ OPEN_MODE_NORMAL
Normal.
Definition btrieveCpp.h:606
static const char * PageLockTypeToString(PageLockType pageLockType)
Return a page lock type as a string.
ACSMode
The Btrieve alternate collation sequence modes.
Definition btrieveCpp.h:53
@ ACS_MODE_UNKNOWN
Unknown.
Definition btrieveCpp.h:65
OwnerMode
The Btrieve file owner modes.
Definition btrieveCpp.h:621
@ OWNER_MODE_UNKNOWN
Unknown.
Definition btrieveCpp.h:633
static const char * LockModeToString(LockMode lockMode)
Return a lock mode as a string.
RecordCompressionMode
The Btrieve record compression modes.
Definition btrieveCpp.h:699
@ RECORD_COMPRESSION_MODE_UNKNOWN
Unknown.
Definition btrieveCpp.h:707
static const char * FileVersionToString(FileVersion fileVersion)
Return a file version as a string.
static const char * IndexToString(Index index)
Return an index as a string.
DataType
The Btrieve data types.
Definition btrieveCpp.h:197
@ DATA_TYPE_UNKNOWN
Unknown.
Definition btrieveCpp.h:261
static const char * DataTypeToString(DataType dataType)
Return a data type as a string.
Index
The Btrieve indexes.
Definition btrieveCpp.h:309
@ INDEX_UNKNOWN
Unknown.
Definition btrieveCpp.h:555