再次提问!100分,关于ADO编辑时出错的问题!各位请进!!!
主要是想编一段自动去除一张表中所有记录和所有字段的前后导空格的过程!
用的是ADO+Access 97 ,部份代码如下:
Tx:Array[1..18] of string;
for i:=1 to DataSource1.DataSet.RecordCount do
begin
ADOQuery1.Edit;
for a:=1 to 18 do //共18个字段
begin
if Trim(ADOQuery1.Fields[a-1].Text)='' then Tx[a]:=' ' else Tx[a]:=Trim(ADOQuery1.Fields[a-1].Text);
end;
DataSource1.DataSet.SetFields([Tx[1],Tx[2],Tx[3],Tx[4],Tx[5],Tx[6],Tx[7],Tx[8],Tx[9],Tx[10],Tx[11],Tx[12],Tx[13],Tx[14],Tx[15],Tx[16],Tx[17],Tx[18]]);
DataSource1.DataSet.RecNo:=DataSource1.DataSet.RecNo+1;
end;
运行时,提示:'键列信息不足或不正确,更新影响到过多的行.'
请问是什么问题?又该如何解决?
望能得到指定!!!
也可发到我的信箱是:cadcamzy@hotmail.com
谢谢!!!