DeleteKeyBlind Delete key value when associated data record position is not known. Short Name DELBLD() Type Low level index file function Declaration LONG DeleteKeyBlind(COUNT keyno, pVOID target) Description DeleteKeyBlind() deletes the key value pointed to by target from index file keyno, if such a key value exists. DeleteKeyBlind() cannot be used when the index file supports duplicate keys. Return If the key value is found in the index, it is deleted and DeleteKeyBlind() returns the associated data record position. If it is not found, or some error is detected, DeleteKeyBlind() returns a zero (which is never a legal data record position), and uerr_cod is set as follows:
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Example LONG recbyt; COUNT keyno; TEXT target[24];
scanf("%23s",target);
if (recbyt = DeleteKeyBlind(keyno,target)) printf("\n%s deleted (data record position = %ld).", target,recbyt);
else printf("\nUnsuccessful deletion (code = %d).",uerr_cod);
Limitations Cannot be used with an index supporting duplicate key values. Without knowledge of the associated data record position, there is no way to distinguish among identical key values. See also DeleteKey() |
|||||||||||||||