R
redwood
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm2.Button2Click(Sender: TObject);
begin
with dm do
begin
form2_query4.Close;
form2_query4.SQL.Clear;
form2_query4.SQL.Add('SELECT Xueji_main.学号,Xueji_main.姓名,Xueji_main.专业,Xueji_main.班级,Xueji_chengji.课程,Xueji_chengji.成绩 FROM "xueji_main.DB" Xueji_main,"xueji_chengji.DB" Xueji_chengji WHERE Xueji_chengji.课程=:n and Xueji_chengji.成绩<60');
form2_query4.ParamByName('n').AsString:=DBLookupComboBox1.KeyValue;
form2_query4.Open;
end;
end;
结果在DBGRID里边显示每一个由该课程的人,而且还把每一个的成绩改成和最低分一样的小于60(而且值还相同)……(我的表内该科成绩不是全部小于60)
begin
with dm do
begin
form2_query4.Close;
form2_query4.SQL.Clear;
form2_query4.SQL.Add('SELECT Xueji_main.学号,Xueji_main.姓名,Xueji_main.专业,Xueji_main.班级,Xueji_chengji.课程,Xueji_chengji.成绩 FROM "xueji_main.DB" Xueji_main,"xueji_chengji.DB" Xueji_chengji WHERE Xueji_chengji.课程=:n and Xueji_chengji.成绩<60');
form2_query4.ParamByName('n').AsString:=DBLookupComboBox1.KeyValue;
form2_query4.Open;
end;
end;
结果在DBGRID里边显示每一个由该课程的人,而且还把每一个的成绩改成和最低分一样的小于60(而且值还相同)……(我的表内该科成绩不是全部小于60)