Public Member Functions | List of all members
BtrieveBulkCreatePayload Class Reference

The Btrieve bulk create payload class. More...

#include <btrieveCpp.h>

Public Member Functions

 BtrieveBulkCreatePayload ()
 
 ~BtrieveBulkCreatePayload ()
 
Btrieve::StatusCode AddRecord (const char *record, int recordLength)
 Add a record. More...
 

Detailed Description

The Btrieve bulk create payload class.

Examples:
btestbulk.cpp.

Constructor & Destructor Documentation

◆ BtrieveBulkCreatePayload()

BtrieveBulkCreatePayload::BtrieveBulkCreatePayload ( )
Snippet
BtrieveBulkCreatePayload btrieveBulkCreatePayload;

◆ ~BtrieveBulkCreatePayload()

BtrieveBulkCreatePayload::~BtrieveBulkCreatePayload ( )

Member Function Documentation

◆ AddRecord()

Btrieve::StatusCode BtrieveBulkCreatePayload::AddRecord ( const char *  record,
int  recordLength 
)

Add a record.

Parameters
[in]recordThe record.
[in]recordLengthThe record length. Record length is limited to Btrieve::MAXIMUM_RECORD_LENGTH bytes.
Description
Bulk create attributes have no records initially.
Snippet
// If AddRecord() fails.
if ((status = btrieveBulkCreatePayload.AddRecord((char *)&record, sizeof(record))) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveBulkCreatePayload::AddRecord():%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:
btestbulk.cpp.