CTRecord::BatchLoaded
Retrieves the number of batch records loaded into batch buffer.
Declaration
LONG CTRecord::BatchLoaded();
Description
CTRecord::BatchLoaded() retrieves the number of batch records loaded into batch buffer for CTBATCH_GET, CTBATCH_RANGE or a CTBATCH_PHYS operation. This is the number of records that are ready to be retrieved by the CTRecord::NextBatch() function.
Return
CTRecord::BatchLoaded() returns the number of records ready for retrieval. In case of an error, CTRecord::BatchLoaded() throws an exception.
Example
try
{
// set the partial target key
hRecord.Clear();
hRecord.SetFieldAsSigned("Invoice", Invoice);
// set the batch operation
hRecord.SetBatch(CTBATCH_GET, sizeof(Invoice), 0);
// show how many records are ready
printf("%d records are ready\n", hRecord.BatchLoaded());
}
catch (CTException& err)
{
printf("Batch failed with error %d\n", hRecord.GetError());
}
See Also
CTRecord::BatchLocked(), CTRecord::BatchMode(), CTRecord::BatchTotal(), CTRecord::EndBatch(), CTRecord::InsertBatch(), CTRecord::IsBatchActive(), CTRecord::NextBatch(), CTRecord::SetBatch()