D
delphi_help
Unregistered / Unconfirmed
GUEST, unregistred user!
with DataModule1.ADOQuery2 do
begin
Close;
SQL.Clear ;
SQL.Add(sqlstr);
SQL.Add('Update tree');
SQL.Add('set NumberID=:NumID,Textstr=:Textx,UnitNum=:Unitx,SizeNum=:Sizex,
Numberfield=:numberstr,DateNum=atex,Manufacturer=:manufac,
MemoStr=:Memox,ParentSoft=arentsoftx');
SQL.Add('where IDxx like:hby');
parameters.ParamByName('NumID').Value :=NumID;
parameters.ParamByName('Textx').Value :=Textx;
parameters.ParamByName('Unitx').Value :=Unitx;
parameters.ParamByName('Sizex').Value :=Sizex;
parameters.ParamByName('Numberstr').Value :=numberstr;
parameters.ParamByName('Datex').Value :=Datex;
parameters.ParamByName('manufac').Value :=manufac;
parameters.ParamByName('Memox').Value :=Memox;
parameters.ParamByName('parentSoftx').Value :=parentsoftx;
parameters.ParamByName('hby').Value :=IDx;
Prepared:=true;
ExecSQL;
end;
变量都是修改过的值,程序运行到'ExecSQL'提示‘Update 语法错误’??
begin
Close;
SQL.Clear ;
SQL.Add(sqlstr);
SQL.Add('Update tree');
SQL.Add('set NumberID=:NumID,Textstr=:Textx,UnitNum=:Unitx,SizeNum=:Sizex,
Numberfield=:numberstr,DateNum=atex,Manufacturer=:manufac,
MemoStr=:Memox,ParentSoft=arentsoftx');
SQL.Add('where IDxx like:hby');
parameters.ParamByName('NumID').Value :=NumID;
parameters.ParamByName('Textx').Value :=Textx;
parameters.ParamByName('Unitx').Value :=Unitx;
parameters.ParamByName('Sizex').Value :=Sizex;
parameters.ParamByName('Numberstr').Value :=numberstr;
parameters.ParamByName('Datex').Value :=Datex;
parameters.ParamByName('manufac').Value :=manufac;
parameters.ParamByName('Memox').Value :=Memox;
parameters.ParamByName('parentSoftx').Value :=parentsoftx;
parameters.ParamByName('hby').Value :=IDx;
Prepared:=true;
ExecSQL;
end;
变量都是修改过的值,程序运行到'ExecSQL'提示‘Update 语法错误’??