关于表字段付值的问题? 我需要将某表中的满足条件的记录的某字段进行付值,我用的是Table控件,请问我该怎么办呢?请高手帮忙! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 table1.edit;table1.fieldByName('字段').value:=YourValue;table1.apply; 你的意思是不是这样:table1.first;while not table1.eof dobeginif table1.fieldbyname('fieldname1').asstring='yours String' then begin table1.edit; table1['fieldname2']:='12212112'; table1.post; end;table1.next;end; table1.edit;table1.FieldByName('field1').asstring := edit1.text;//最好用asstring之类的确定类型的函数,否则的话用value的话可能效率比较低,因为需要系统对数据类型转换table1.apply; Sql列出的数据,如何用DBGrid一类的控件显示? 先来先得哟:替换字符串任意位置的一字符 如何发桥牌给四个人呀! 救命!如何获取WebSnap Apllication的TEndUserSessionAdapter中封装的用户登陆信息!,急,在线等! 图标问题 关于文件的查找!! 指针类型哪儿出问题啊 如何读取另外一个程序中TdxDBGrid控件中的内容! 高分求一弱智问题,如何求1,2,3,4,...n的最小公倍数 又见csdn! 怎樣設置dbgrid某列的屬性?如設置某列為隻讀屬性等! 为什么Locate就回提交数据呢?
table1.fieldByName('字段').value:=YourValue;
table1.apply;
table1.first;
while not table1.eof do
begin
if table1.fieldbyname('fieldname1').asstring='yours String' then
begin
table1.edit;
table1['fieldname2']:='12212112';
table1.post;
end;
table1.next;
end;
table1.FieldByName('field1').asstring := edit1.text;
//最好用asstring之类的确定类型的函数,否则的话用value的话可能效率比较低,因为需要系统对数据类型转换
table1.apply;