dm.ADOQueryFlg.SQL.Text:='select flg from information where 学级 = '''+txtgrade.Text+''',专业 = '''+txtdep.Text+''',班级 = '''+txtclass.Text+'''';
edit1.Text:= dm.ADOQueryFlg.FieldValues['flg'];
运行时他非说我flg字段找不到!!!可是我information表里有这个字段!!!为什么啊???!!!
dm 为DataModule
edit1.Text:= dm.ADOQueryFlg.FieldValues['flg'];
运行时他非说我flg字段找不到!!!可是我information表里有这个字段!!!为什么啊???!!!
dm 为DataModule
其次,你的ADOQueryFlg open了没dm.ADOQueryFlg.SQL.Text:='select flg from information where 学级 = '''+txtgrade.Text+''' and 专业 = '''+txtdep.Text+''' and 班级 = '''+txtclass.Text+'''';
dm.ADOQueryFlg.Open;
edit1.Text:= dm.ADOQueryFlg.FieldValues['flg'];
不过问一个问题,为什么还得open啊??