Btrieve 2
Loading...
Searching...
No Matches
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.
 

Detailed Description

The Btrieve bulk create payload class.

Examples
btestbulk.cpp.

Constructor & Destructor Documentation

◆ BtrieveBulkCreatePayload()

BtrieveBulkCreatePayload::BtrieveBulkCreatePayload ( )
Snippet
C++ btestbulk.cpp
BtrieveBulkCreatePayload btrieveBulkCreatePayload;
Python btestbulk.py
btrieveBulkCreatePayload = btrievePython.BtrieveBulkCreatePayload()
assert(btrieveBulkCreatePayload != None)

◆ ~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
C++ btestbulk.cpp
// 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;
}
Python btestbulk.py
rc = btrieveBulkCreatePayload.AddRecord(record)
assert(rc == btrievePython.Btrieve.STATUS_CODE_NO_ERROR), "Error: BtrieveBulkCreatePayload::AddRecord():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples
btestbulk.cpp.