用ADOQuery执行delete和update的SQL语句时,总出现“期待参数是1”的错误提示。
大家知道是什么问题吗?我想我的SQL语句是没有错的。
大家知道是什么问题吗?我想我的SQL语句是没有错的。
解决方案 »
- delphi装好后怎么没有clientserver和serversocket这两个控件啊》?
- ehlib中的DBGridEh控件标题多行如何显示,答者有分啊
- XML节点操作的一个问题:如何通过属性值查找一个节点?
- 为什么用delphi写的服务程序无法访问网络路径????但在调试时可以访问,谢谢大虾的回答,我在线等待?????
- 怎样用mscomm的oncomm事件做成循环的发送,接收,处理,再发送的循环过程?
- 我在XP下编的程序在Win2000下不能运行?
- 关于数据库中的性别字段直接存字符‘男’‘女’还是存编码好,大家讨论一下
- DELPHI中编程实现文件的搜索?????急呀!!谢谢
- Delphi 的 多个scrollbox关联鼠标滚轮
- Dbgrid的自动换行问题
- 工资有这么高吗,我怎么感觉不到啊?(生活在平均工资以下)
- 请问谁有 powerDesign 9.5 下的 delphi 语言扩展包?
var fil:string;
begin
if MessageDlg('删除此条记录?',mtConfirmation,[mbYes,mbNo],0)=mrNo then
exit;fil:='';if trim(dbedit12.Text)<>'' then
fil:='类型='+quotedstr(trim(dbedit12.text));if trim(dbedit13.Text)<>'' then
if fil='' then
fil:='名称='+quotedstr(trim(dbedit13.text))
else
fil:=fil+' and 名称='+quotedstr(trim(dbedit13.text));if trim(dbedit14.Text)<>'' then
if fil='' then
fil:='规格='+quotedstr(trim(dbedit14.text))
else
fil:=fil+' and 规格='+quotedstr(trim(dbedit14.text));if trim(dbedit15.Text)<>'' then
if fil='' then
fil:='品牌='+quotedstr(trim(dbedit15.text))
else
fil:=fil+' and 品牌='+quotedstr(trim(dbedit15.text));if trim(dbedit16.Text)<>'' then
if fil='' then
fil:='车型='+quotedstr(trim(dbedit16.text))
else
fil:=fil+' and 车型='+quotedstr(trim(dbedit16.text));if trim(dbedit17.Text)<>'' then
if fil='' then
fil:='通用车型='+quotedstr(trim(dbedit17.text))
else
fil:=fil+' and 通用车型='+quotedstr(trim(dbedit17.text));if fil<>'' then
begin
with adoquery3 do
begin
try
close;
sql.clear;
sql.Add('update 配件 set 库存量=库存量+'+dbedit20.Text+',出货总数=出货总数-'+dbedit20.Text+',出货总额=出货总额-'+dbedit21.Text+' where '+fil);execsql;
adoquery2.Delete;
except
raise;
end;
end;
end;end;
根本就没有。
sql.Add('update 配件 set 库存量=库存量+'+dbedit20.Text+',出货总数=出货总数-'+dbedit20.Text+',出货总额=出货总额-'+dbedit21.Text+' where '+fil);
总会出现“期待参数是1”的错误提示。