Finds the index of a field object in the Fields array from the field object.function IndexOf(Field: TField): Integer;DescriptionCall IndexOf to get the index for a field in the Fields array. Specify the field as the Field parameter. The first field in the array has index 0, the second field has index 1, and so on. If a field is not in the Fields array, IndexOf returns -1.
i:integer;
begin
for i:=0 to datam.ADOQ_lgbjbda.FieldCount -1 do
if datam.ADOQ_lgbjbda.FieldList.Fields[i].IsNull do
showmessage('该字段不允许为空!')
i:integer;
begin
for i:=0 to datam.ADOQ_lgbjbda.FieldCount -1 do
if datam.ADOQ_lgbjbda.FieldList.Fields[i].IsNull do
showmessage('该字段不允许为空!'