Btrieve 2
Loading...
Searching...
No Matches
BtrieveBulkCreateResult Class Reference

The Btrieve bulk create result class. More...

#include <btrieveCpp.h>

Public Member Functions

 BtrieveBulkCreateResult ()
 
 ~BtrieveBulkCreateResult ()
 
Btrieve::StatusCode GetLastStatusCode ()
 Get the last status code.
 
int GetRecordCount ()
 Get the record count.
 
long long GetRecordCursorPosition (int recordNumber)
 Get the record cursor position.
 

Detailed Description

The Btrieve bulk create result class.

Examples
btestbulk.cpp.

Constructor & Destructor Documentation

◆ BtrieveBulkCreateResult()

BtrieveBulkCreateResult::BtrieveBulkCreateResult ( )
Snippet
C++ btestbulk.cpp
BtrieveBulkCreateResult btrieveBulkCreateResult;
Python btestbulk.py
btrieveBulkCreateResult = btrievePython.BtrieveBulkCreateResult()
assert(btrieveFile != None)

◆ ~BtrieveBulkCreateResult()

BtrieveBulkCreateResult::~BtrieveBulkCreateResult ( )

Member Function Documentation

◆ GetLastStatusCode()

Btrieve::StatusCode BtrieveBulkCreateResult::GetLastStatusCode ( )

Get the last status code.

Note
This method is intended for use following methods which don't return a status code.
Snippet
C++ btestbulk.cpp
// If GetRecordCount() fails.
if ((recordCount = btrieveBulkCreateResult.GetRecordCount()) != (MAX_X - MIN_X + 1))
{
status = btrieveBulkCreateResult.GetLastStatusCode();
printf("Error: BtrieveBulkCreateResult::GetRecordCount():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Python btestbulk.py
rc = btrieveBulkCreateResult.GetRecordCount()
assert(rc == (max_x - min_x + 1)), "Error: BtrieveBulkCreateResult::GetRecordCount():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveBulkCreateResult.GetLastStatusCode()))
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples
btestbulk.cpp.

◆ GetRecordCount()

int BtrieveBulkCreateResult::GetRecordCount ( )

Get the record count.

Snippet
C++ btestbulk.cpp
// If GetRecordCount() fails.
if ((recordCount = btrieveBulkCreateResult.GetRecordCount()) != (MAX_X - MIN_X + 1))
{
status = btrieveBulkCreateResult.GetLastStatusCode();
printf("Error: BtrieveBulkCreateResult::GetRecordCount():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Python btestbulk.py
rc = btrieveBulkCreateResult.GetRecordCount()
assert(rc == (max_x - min_x + 1)), "Error: BtrieveBulkCreateResult::GetRecordCount():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveBulkCreateResult.GetLastStatusCode()))
Return values
>= 0The record count.
-1An error has occurred. Use BtrieveBulkCreateResult::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.
Examples
btestbulk.cpp.

◆ GetRecordCursorPosition()

long long BtrieveBulkCreateResult::GetRecordCursorPosition ( int recordNumber)

Get the record cursor position.

Note
The signature for this method changed in PSQL v13 R2.
Parameters
[in]recordNumberThe record number.
Snippet
C++ btestbulk.cpp
// If GetRecordCursorPosition() fails.
if ((cursorPosition = btrieveBulkCreateResult.GetRecordCursorPosition(i)) < 0)
{
status = btrieveBulkCreateResult.GetLastStatusCode();
printf("Error: BtrieveBulkCreateResult::GetRecordCursorPosition():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Python btestbulk.py
rc = btrieveBulkCreateResult.GetRecordCursorPosition(i)
assert(rc >= 0), "Error: BtrieveBulkCreateResult::GetRecordCursorPosition():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(rc))
Return values
>= 0The record cursor position.
-1An error has occurred. Use BtrieveBulkCreateResult::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.
Examples
btestbulk.cpp.