DbiWriteBlock

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiWriteBlock

Return to chapter overview

C syntax

DBIResult DBIFN DbiWriteBlock (hCursor, piRecords, pBuf);

Delphi syntax

function DbiWriteBlock (hCursor: hDBICur; var iRecords: Longint; pBuf: Pointer): DBIResult stdcall;

Description

DbiWriteBlock writes a block of records to the table associated with hCursor.

Parameters

hCursor                Type: hDBICur                (Input)
Specifies the cursor handle to the table.

piRecords                Type: pUINT32                (Input/Output)
On input, piRecords is a pointer to the number of records to write. On output, pointer to the client variable that receives the actual number of records written. The number actually written may be less than requested if an integrity violation or other error occurred.

pBuf                Type: pBYTE                (Input)
Pointer to the buffer containing the records to be written.

Usage

This function is similar to calling DbiAppendRecord for the specified number of piRecords. DbiWriteBlock can access data in blocks larger than 64Kb, depending on the size you allocate for the buffer.

Note:        This function cannot be used if the records contain non-empty BLOBs.

Paradox: This function verifies any referential integrity requirements or validity checks that may be in place. If either fails, the write operation is canceled.

Completion state

The cursor is positioned at the last record that was inserted.

DbiResult

Meaning

DBIERR_NONE

The block of records contained in pBuf has been successfully written to the table specified by hCursor.

DBIERR_INVALIDHNDL

The specified cursor handle is invalid or NULL, or piRecords is NULL, or pBuf is NULL.

DBIERR_TABLEREADONLY

The table is opened read-only; cannot write to it.

DBIERR_NOTSUFFTABLERIGHTS

Insufficient table rights to insert a record. (Paradox only.)

DBIERR_NODISKSPACE

Insertion failed due to insufficient disk space.

See also

DbiReadBlock, DbiAppendRecord, DbiInsertRecord