Y
yedixifeng
Unregistered / Unconfirmed
GUEST, unregistred user!
软件原来是用的access,现在改为sql,下面这段保存代码遇到了问题:
procedure TBM_ZHIYUANF.saveClick(Sender: TObject);
var
strName: String;
begin
button_valid;
with dm.qryRun do
begin
Close;
SQL.Text := ' update zhiyuan set 违章车号 = "'
+ xingming.Text + '",'
+ '姓别="' +cb1.Text +'",'
+ '违章时间="' +shengri.Text +'",'
+ '系统类别="' +xingming.Text +'",'
+ '编辑输入="' +jiguan.Text +'",'
+ '处罚种类="' +xueli.Text +'",'
+ '发案方式="' +zhicheng.Text +'",'
+ '违章车型="' +shenfen.Text +'",'
+ '通知书编号="' +zhiwu.Text +'",'
+ '违章地点="' +diaoru.Text +'",'
+ '被处罚人="' +email.Text +'",'
+ '执法人员="' +bangong.Text +'",'
+ '处理日期="' +zhuzhai.Text +'",'
+ '地址电话="' +shouji.Text +'",'
+ '路径一="' +lujing.Text +'",'
+ '路径二="' +lujing1.Text +'",'
+ '路径三="' +lujing2.Text +'",'
+ '处理结果="' +culijg.Text +'",'
+ '处罚金额="' +cufaje.Text +'",'
+ '查找单位="' +cazaodw.Text +'",'
+ '违章车号1="' +weizhangch.Text +'",'
+ 'idd="' +Edit2.Text +'",'
+ '备注="' +memo.Text +'"'
+ ' where ID = '+IntToStr(vv);
Prepared := True;
ExecSQL;
DM.zhiyuan2.Open ;
saveimage;
end;
TreeView1.Selected.Text := xingming.Text ;
TreeView1.SetFocus;
TreeView1.Selected.Selected := True;
noedit;
end;
保存时,提示“不能使用空白的对象或列名…………”
请教,这段代码该如何重新写或修改?谢谢
procedure TBM_ZHIYUANF.saveClick(Sender: TObject);
var
strName: String;
begin
button_valid;
with dm.qryRun do
begin
Close;
SQL.Text := ' update zhiyuan set 违章车号 = "'
+ xingming.Text + '",'
+ '姓别="' +cb1.Text +'",'
+ '违章时间="' +shengri.Text +'",'
+ '系统类别="' +xingming.Text +'",'
+ '编辑输入="' +jiguan.Text +'",'
+ '处罚种类="' +xueli.Text +'",'
+ '发案方式="' +zhicheng.Text +'",'
+ '违章车型="' +shenfen.Text +'",'
+ '通知书编号="' +zhiwu.Text +'",'
+ '违章地点="' +diaoru.Text +'",'
+ '被处罚人="' +email.Text +'",'
+ '执法人员="' +bangong.Text +'",'
+ '处理日期="' +zhuzhai.Text +'",'
+ '地址电话="' +shouji.Text +'",'
+ '路径一="' +lujing.Text +'",'
+ '路径二="' +lujing1.Text +'",'
+ '路径三="' +lujing2.Text +'",'
+ '处理结果="' +culijg.Text +'",'
+ '处罚金额="' +cufaje.Text +'",'
+ '查找单位="' +cazaodw.Text +'",'
+ '违章车号1="' +weizhangch.Text +'",'
+ 'idd="' +Edit2.Text +'",'
+ '备注="' +memo.Text +'"'
+ ' where ID = '+IntToStr(vv);
Prepared := True;
ExecSQL;
DM.zhiyuan2.Open ;
saveimage;
end;
TreeView1.Selected.Text := xingming.Text ;
TreeView1.SetFocus;
TreeView1.Selected.Selected := True;
noedit;
end;
保存时,提示“不能使用空白的对象或列名…………”
请教,这段代码该如何重新写或修改?谢谢