马
马户
Unregistered / Unconfirmed
GUEST, unregistred user!
我用ADOQURY1,DataSource1,DBGrid1.查询出一个库,在DBGrid1种显示修改其中的记录,不能写入数据库,且提示有错
怎么办
procedure Tmainpro.DBGrid1CellClick(Column: TColumn);
begin
if column.FieldName = 'issn2' then
begin
WITH ADOQURY1 do
BEGIN
edit;
IF FieldByName('issn2').Asstring = '√' THEN
FieldByName('issn2').Asstring := ''
ELSE FieldByName('issn2').Asstring := '√';
UPDATE;
END;
end;
end;
怎么办
procedure Tmainpro.DBGrid1CellClick(Column: TColumn);
begin
if column.FieldName = 'issn2' then
begin
WITH ADOQURY1 do
BEGIN
edit;
IF FieldByName('issn2').Asstring = '√' THEN
FieldByName('issn2').Asstring := ''
ELSE FieldByName('issn2').Asstring := '√';
UPDATE;
END;
end;
end;