Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

delIDfield

Removes the IDENTITY attribute from a DODA field

Declaration

delIDfield(FILNO datno)

Type

ISAM function

Description

In V12 the file number typedef was formally changed from COUNT, a two-byte value to FILNO, a four-byte value. Refer to this link for compatibility details. Four Byte File Numbering

delIDfield() removes an IDfield (IDENTITY) auto-numbering attribute from a numeric field in a record.

Where:

  • datno is the data file number

IDfield requires a DAR resource (Direct Access Resource) embedded in the file. The DAR is a specialized high-speed resource.

Return

Value

Symbolic Constant

Explanation

0

NO_ERROR

Success

See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.

Example

retval = delIDfield(fileno);

if (retval) {

printf("\tERROR: Failed to remove ID field with error %d\n", retval);

}

Override IDENTITY Values

PUTHDR() using the ctIDfieldOverRide mode can turn on and off the ability to override the automatic IDfield values. The override is on a per user, per file basis. A nonzero hdrval turns on the override, and a zero hdrval restores the standard operation. When the override is on for a data file that supports an IDfield, then an add record operation does not fill-in the IDfield value. Whatever is passed in the record buffer is used for the IDfield. And a rewrite permits the IDfield value to change instead of generating the IDFL_CHG error. When the override is enabled, add record operations do not consume IDfield values.

See also

addIDfield, getIDfield, wchIDfield, resetIDfield, IDfields - Extended support

TOCIndex