数据库 access 连接方式: ado
这样写出错:
with ADOQuery1 do begin
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('update faintdb set nm=''pity'' where zy like ''软%'');
end;
各位该怎么写!
意思是把zy是‘软*’的nm修改为pity.
这样写出错:
with ADOQuery1 do begin
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('update faintdb set nm=''pity'' where zy like ''软%'');
end;
各位该怎么写!
意思是把zy是‘软*’的nm修改为pity.
begin
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('update faintdb set nm=''pity'' where zy like ''软%'');
ADOQuery1.ExecSql;
end;
begin
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('update faintdb set nm=''pity'' where zy like ''软%'');
ADOQuery1.ExecSql;
end;
begin
SQL.Clear;
SQL.Add('update faintdb set nm=''pity'' where zy like ''软%''');
ExecSql;
end;
begin
SQL.Clear;
SQL.Add('update faintdb set nm='''pity''' where zy like '''软%''');
ExecSql;
end;
begin
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('update faintdb set nm=''pity'' where zy like ''软%'' ');----->>>>记着最后面的引号
ADOQuery1.ExecSql;
end;
Top
ADOQuery1.SQL.Add('update faintdb set nm='''pity''' where zy like '''软%'''');或
ADOQuery1.SQL.Add('update faintdb set nm='#39'pity'#39' where zy like '#39'软%'#39);