delphi问题
ADOtable1.Active:=True;ADOtable1.Edit;ADOtable1.FieldByName('users').AsString:=Edit1....
ADOtable1.Active:= True;
ADOtable1.Edit;
ADOtable1.FieldByName('users').AsString :=Edit1.Text;
ADOtable1.FieldByName('password').AsString :=Edit2.Text;
ADOtable1.FieldByName('qx').AsVariant :=ComboBox1.Text;
//ADOQuery1.ExecSQL;
ADOtable1.Post;
为什么数据之更新一条
改成
ADOtable1.Active:= True;
ADOtable1.First ;
while not ADOtable1.Eof do
begin
ADOtable1.Edit;
ADOtable1.FieldByName('users').AsString :=Edit1.Text;
ADOtable1.FieldByName('password').AsString :=Edit2.Text;
ADOtable1.FieldByName('qx').AsVariant :=ComboBox1.Text;
//ADOQuery1.ExecSQL;
ADOtable1.Post;
ADOtable1.Next ;
end;
但还是只更新一条啊!! 展开
ADOtable1.Edit;
ADOtable1.FieldByName('users').AsString :=Edit1.Text;
ADOtable1.FieldByName('password').AsString :=Edit2.Text;
ADOtable1.FieldByName('qx').AsVariant :=ComboBox1.Text;
//ADOQuery1.ExecSQL;
ADOtable1.Post;
为什么数据之更新一条
改成
ADOtable1.Active:= True;
ADOtable1.First ;
while not ADOtable1.Eof do
begin
ADOtable1.Edit;
ADOtable1.FieldByName('users').AsString :=Edit1.Text;
ADOtable1.FieldByName('password').AsString :=Edit2.Text;
ADOtable1.FieldByName('qx').AsVariant :=ComboBox1.Text;
//ADOQuery1.ExecSQL;
ADOtable1.Post;
ADOtable1.Next ;
end;
但还是只更新一条啊!! 展开
4个回答
展开全部
ADOtable1.Active:= True;
ADOtable1.First ;
while not ADOtable1.Eof do
begin
ADOtable1.Edit;
ADOtable1.FieldByName('users').AsString :=Edit1.Text;
ADOtable1.FieldByName('password').AsString :=Edit2.Text;
ADOtable1.FieldByName('qx').AsVariant :=ComboBox1.Text;
//ADOQuery1.ExecSQL;
ADOtable1.Post;
ADOtable1.Next ;
end;
应该是可以遍历完所有数据进行更新的。。
调试下看看。
ADOtable1.First ;
while not ADOtable1.Eof do
begin
ADOtable1.Edit;
ADOtable1.FieldByName('users').AsString :=Edit1.Text;
ADOtable1.FieldByName('password').AsString :=Edit2.Text;
ADOtable1.FieldByName('qx').AsVariant :=ComboBox1.Text;
//ADOQuery1.ExecSQL;
ADOtable1.Post;
ADOtable1.Next ;
end;
应该是可以遍历完所有数据进行更新的。。
调试下看看。
展开全部
ADOtable1.Active:= True;
ADOtable1.First ;
while not ADOtable.Eof do
begin
ADOtable1.Edit;
ADOtable1.FieldByName('users').AsString :=Edit1.Text;
ADOtable1.FieldByName('password').AsString :=Edit2.Text;
ADOtable1.FieldByName('qx').AsVariant :=ComboBox1.Text;
//ADOQuery1.ExecSQL;
ADOtable1.Post;
ADOtable.Next ;
end;
ADOtable1.First ;
while not ADOtable.Eof do
begin
ADOtable1.Edit;
ADOtable1.FieldByName('users').AsString :=Edit1.Text;
ADOtable1.FieldByName('password').AsString :=Edit2.Text;
ADOtable1.FieldByName('qx').AsVariant :=ComboBox1.Text;
//ADOQuery1.ExecSQL;
ADOtable1.Post;
ADOtable.Next ;
end;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
呵呵是ADOtable还是ADOtable1 先搞清楚 用AdoQuery试试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
当然只更新一行,更新游标所在的行
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询