ctdbGetFieldNumberByName
Return the field number, based on the field name and record handle.
Declaration
NINT ctdbGetFieldNumberByName(CTHANDLE Handle, pTEXT FieldName)
Description
ctdbGetFieldNumberByName() returns the field number given the field name and the record handle. Use ctdbGetFieldNumber() to retrieve the field number given the table handle. Use ctdbGetFieldNbr() to retrieve the field number given a field handle.
Returns
ctdbGetFieldNumberByName() returns the field number, or -1 on error.
Example
pMyRec1 = ctdbAllocRecord(pMyTable1);
ctdbFirstRecord(pMyRec1);
fldnbr = ctdbGetFieldNumberByName(pMyRec1, "Name");
See also
ctdbAllocTable(), ctdbGetField(), ctdbGetFieldNbr(), ctdbGetFieldByName(), ctdbGetFieldLength(), ctdbGetFieldName()