- 博客(0)
- 资源 (1)
空空如也
经济批量订货决策系统
adoquery1.Close;
adoquery1.SQL.Text:='select * from cs';
adoquery1.Open;
a :=adoquery1.fieldbyname('a').Value;...................................//a、b参数的获取
b :=adoquery1.fieldbyname('b').Value;
adoquery1.close;
adoquery1.SQL.Text:='select x from yc where id =1';
adoquery1.Open;
x :=adoquery1.fieldbyname('x').Value; ……………………….//要预测的产品数量x。
y:=a + b * x; ……………………//计算y的值
with adoquery1 do
begin
close;
sql.Clear;
sql.Add('update yc set y =:y1 where id=1'); …………………… //将y的值写入yc表。
parameters.ParamByName('y1').Value:=floattostr(y);
execsql;
close;
2013-11-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人