var
c:integet;
b,max:string;
begin
query2.close;
query2.sql.clear;
query2.sql.text:='select Max(bz) From qbb';
query2.open;
Max:=Query2.Fields.FieldByNumber(1).Asstring;
c:=strtoint(max);
b:=inttostr(c+1);//当运行到10时,就出错。为什么?
edit9.Text:=b;
query2.Close;
query2.sql.Clear;
query2.SQL.Add('insert into qbb');
query2.SQL.Add('(bianha,qbri,qbr,bz)');
query2.SQL.Add('values('''+edit8.text+''','''+edit6.text+''','''+edit7.text+''','''+b+''');');
query2.execsql;
end;
不知为什么?当 运行到B=10时,程序就不自动累加了?