哪位朋友帮我看一下,我在线等!(0分)

N

nbyyslf

Unregistered / Unconfirmed
GUEST, unregistred user!
var a,b,i:integer;c,e:string;
begin
if Application.MessageBox('真得要保存数据吗?','信息',MB_YESNO )=IDYES then
begin
table3.open;
i:=0;e:='';
a:=strtoint(edit1.text);
c:=inttostr(a);b:=Length(c);

while table3.FindKey([edit1.text]) do
begin
if b<4 then
while i<4-b do
begin
e:=e+'0';
i:=i+1;
end;
a:=a+1;
edit1.Text:=e+inttostr(a);
end;
table3.Close;
table1.First;
while not table1.Eof do
begin
table1.Edit;
table1ddh.Value:=edit1.text;
table1.Next;
end;
end;
我写了这么一段程序,但是最后一个循环
while not table1.Eof do
begin
table1.Edit;
table1ddh.Value:=edit1.text;
table1.Next;
end;
只能修改TABLE1里面的最后一条记录的DDH不知道为什么,请哪位朋友指教!
 
少了table1.post;
 
我用了TABLE1.POST
也是这样呀!这个DDH字段是建了索引的!
 
接受答案了.
 
顶部