程序为:
AdoQuery2.Close;
AdoQuery2.Sql.Clear;
AdoQuery2.sql.Add('select avg(成绩) as pingjunfen from std  where 科目="'+DBLookupComboBox2.text+'"');
AdoQuery2.Open;
label6.Caption:=inttostr(adoquery2.FieldValues['pingjunfen']);Watch list里面的调试错误信息为:
select max(成绩) from std where std.科目="'+DBLookupComboBox2.text'" and: Undeclared identifier: 'select'
DBLookupComboBox2: ([csInheritable], False, False, (0, 0))
select: Undeclared identifier: 'select'
sqlstr: Symbol was eliminated by linker
select: Undeclared identifier: 'select'
sqlstr3: ''
 label8.Caption:=inttostr(adoquery3.FieldValues['zuigaofen']);: <disabled>
 sqlstr:='select avg(成绩)  from std where 考试时间='+DBLookupComboBox4.text: Symbol was eliminated by linker为什么说Undeclared identifier:‘select’??