数据库 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.
解决方案 »
- C/S 数据传送问题
- 一个SQLServer的语法问题,说简单也简单!在线等
- 请教一个关于C++Builder与Delphi之间转换的问题,在线等待中...
- 一个关于INI文件的问题?
- 兄弟想问一个非常简单的问题,如何运行一个不带Form窗体的程序,只运行里面的程序,能详细说一下操作方法吗?感激不尽
- delphi 中有点怪的东西...
- 如何动态的创建一个按钮?
- delphi中如何使从数据库输出的记录右对齐
- 那位大哥帮帮我~我妹妹要的
- 在delphi中动态创建table或view,如何得知后台数据库中的table或view是否存在,而不是返回出错提示!
- FAST REPORT控件怎么安装?
- 咨询病房管理系统
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);