这是什么意思啊?更新数据语法是怎样的?BZM是我Access里面的第一个字段,ZH等都可以更新,
BZM确不能更新,是为什么啊?代码如下:
if radiobutton6.Checked then
begin
try
with DataModule2.ADOQuery1 do
begin
sql.Clear ;
sql.add('update w set BZM=:BZM,ZH=:ZH,YFLH=:YFLH,ZWM=:ZWM '
+'where BZM='''+edit2.text+'''');
parameters.ParamByName('BZM').Value :=edit2.Text ;
parameters.ParamByName('ZH').Value :=edit3.Text ;
parameters.ParamByName('YFLH').Value :=edit4.Text ;
parameters.ParamByName('ZWM').Value :=edit5.Text ;
execsql;
end;
except
messagedlg('修改<'+edit2.Text +'>失败',mterror,[mbok],0);
exit;
end;
BZM确不能更新,是为什么啊?代码如下:
if radiobutton6.Checked then
begin
try
with DataModule2.ADOQuery1 do
begin
sql.Clear ;
sql.add('update w set BZM=:BZM,ZH=:ZH,YFLH=:YFLH,ZWM=:ZWM '
+'where BZM='''+edit2.text+'''');
parameters.ParamByName('BZM').Value :=edit2.Text ;
parameters.ParamByName('ZH').Value :=edit3.Text ;
parameters.ParamByName('YFLH').Value :=edit4.Text ;
parameters.ParamByName('ZWM').Value :=edit5.Text ;
execsql;
end;
except
messagedlg('修改<'+edit2.Text +'>失败',mterror,[mbok],0);
exit;
end;
解决方案 »
- 谁能提供仿系统托盘思路?
- 已知TREEVIEW中某个节点的X,Y,那如何用代码来选中那个节点??
- 如何实现视频聊天。
- 谁有TDBGridEh这个控件,给小弟一份,高分求购,分不够可再加?
- 如何利用ClientDataSet的commandtext 属性动态查询? 在线等待
- 在继承于TDBGrid的前提下!如何在Column里添加一个属性?拜拖!!!谢谢!
- 这样的报表怎么去实现呢??
- 程序中有两个form怎么实现form1执行后在执行form2?
- 刚才的SQL我自己解决了!这个打印怎么解决啊!
- spcomm 串口通讯 的问题,大虾请进
- delphi+oracle开发人事档案管理系统的问题
- 第一次遇到这个问题!
SET newvalue
WHERE criteria table
要改变其数据内容的数据库名称
newvalue
将旧纪录值改变为新值的表达式, .
criteria
一个表达式, SQL将通过该表达式监测哪些纪录值将被改变这是我查到的语法,可是监测的那个edit2.Text 偏偏没有更新!搞笑啊