Public Member Functions | List of all members
BtrieveBulkRetrieveAttributes Class Reference

The Btrieve bulk retrieve attributes class. More...

#include <btrieveCpp.h>

Public Member Functions

 BtrieveBulkRetrieveAttributes ()
 
 ~BtrieveBulkRetrieveAttributes ()
 
Btrieve::StatusCode AddField (int offset, int length)
 Add a field. More...
 
Btrieve::StatusCode AddFilter (BtrieveFilter *btrieveFilter)
 Add a filter. More...
 
Btrieve::StatusCode SetMaximumRecordCount (int maximumRecordCount)
 Set the maximum record count. More...
 
Btrieve::StatusCode SetMaximumRejectCount (int maximumRejectCount)
 Set the maximum reject count. More...
 
Btrieve::StatusCode SetSkipCurrentRecord (bool skipCurrentRecord)
 Set skip current record. More...
 

Detailed Description

The Btrieve bulk retrieve attributes class.

Examples:
bfilter.cpp, and btestbulk.cpp.

Constructor & Destructor Documentation

◆ BtrieveBulkRetrieveAttributes()

BtrieveBulkRetrieveAttributes::BtrieveBulkRetrieveAttributes ( )
Snippet
BtrieveBulkRetrieveAttributes btrieveBulkRetrieveAttributes;

◆ ~BtrieveBulkRetrieveAttributes()

BtrieveBulkRetrieveAttributes::~BtrieveBulkRetrieveAttributes ( )

Member Function Documentation

◆ AddField()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddField ( int  offset,
int  length 
)

Add a field.

Parameters
[in]offsetThe offset. Offset must be less than Btrieve::MAXIMUM_RECORD_LENGTH.
[in]lengthThe length. Length is limited to Btrieve::MAXIMUM_RECORD_LENGTH.
Description
Get bulk attributes have no fields initially. Offset plus length is limited to Btrieve::MAXIMUM_RECORD_LENGTH.
Snippet
// If AddField() fails.
if ((status = btrieveBulkRetrieveAttributes.AddField(0, sizeof(record))) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveBulkRetrieveAttributes::AddField():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bfilter.cpp, and btestbulk.cpp.

◆ AddFilter()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::AddFilter ( BtrieveFilter btrieveFilter)

Add a filter.

Parameters
[in]btrieveFilterThe filter.
Description
Get bulk attributes have no filters initially.
Snippet
// If AddFilter() fails.
if ((status = btrieveBulkRetrieveAttributes.AddFilter(&btrieveFilter)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveBulkRetrieveAttributes::AddFilter():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bfilter.cpp, and btestbulk.cpp.

◆ SetMaximumRecordCount()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::SetMaximumRecordCount ( int  maximumRecordCount)

Set the maximum record count.

Parameters
[in]maximumRecordCountThe maximum record count. The maximum record count must be greater than 0 and less than 65536.
Description
Maximum record count defaults to zero.
Snippet
// If SetMaximumRecordCount() fails.
if ((status = btrieveBulkRetrieveAttributes.SetMaximumRecordCount(1)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveBulkRetrieveAttributes::SetMaximumRecordCount():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bfilter.cpp, and btestbulk.cpp.

◆ SetMaximumRejectCount()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::SetMaximumRejectCount ( int  maximumRejectCount)

Set the maximum reject count.

Parameters
[in]maximumRejectCountThe maximum reject count. The maximum reject count must be greater than or equal to 0 and less than 65536. A value of zero sets the maximum reject count to the PSQL defined value.
Description
Maximum reject count defaults to the PSQL defined value.
Snippet
// If SetMaximumRejectCount() fails.
if ((status = btrieveBulkRetrieveAttributes.SetMaximumRejectCount(MAX_X - MIN_X + 1)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveBulkRetrieveAttributes::SetMaximumRejectCount():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bfilter.cpp, and btestbulk.cpp.

◆ SetSkipCurrentRecord()

Btrieve::StatusCode BtrieveBulkRetrieveAttributes::SetSkipCurrentRecord ( bool  skipCurrentRecord)

Set skip current record.

Parameters
[in]skipCurrentRecordSkip current record?
Description
Skip current record is disabled by default.
Snippet
// If SetSkipCurrentRecord() fails.
if ((status = btrieveBulkRetrieveAttributes.SetSkipCurrentRecord(false)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveBulkRetrieveAttributes::SetSkipCurrentRecord():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bfilter.cpp, and btestbulk.cpp.