Product Documentation

FairCom ODK Driver

Previous Topic

Next Topic

RecordInsert

Adds a new record to the specified table on a specified IO channel.

void FCODKDriver::RecordInsert(const char *tableName, const char *pk, unsigned long valueLen, void *valueBuffer)

Parameters:

  • IO Channel Number - See Read Record.
  • tableName [IN] - Table Name. See TableCreate.
  • pk [IN] - Primary Key. See RecordRead.
  • valueLen [IN] - Record Value. Value length populated in the provided buffer. Record Value is an array of bytes.

    It can be NULL.

    The driver stores this value in the record.

    Invalid Value Error Conditions:

    • None
  • valueBuffer [IN] - Record Length. Value buffer populated with the record data. See RecordRead.

Result Values: N/A

Expected Errors:

  • Primary Key matches an existing record in the table.
  • A new record cannot be inserted when it would overwrite an existing record in the table.

When an Error Occurs:

  • Driver does not insert the record.

TOCIndex