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