清
清风杨
Unregistered / Unconfirmed
GUEST, unregistred user!
With ADOQuery1 do
begin
Sql.Clear;
Sql.Add('insert into input1 (inputno,name,amount,date,memo)valuesv1,:v2,:v3,:v4,:v5)');
parameters.ParamByName('v1').Value:=Trim(edit1.Text);
parameters.ParamByName('v2').Value:=Trim(edit2.Text);
Parameters.ParamByName('v3').Value:=Trim(edit3.Text);
Parameters.ParamByName('v4').Value:=datetostr(datetimepicker1.Date);
parameters.ParamByName('v5').Value:=Trim(edit5.Text);
{ Sql.Add('insert into input1 (inputno,name,amount,date,memo) values v1,:v2,:v3,:v4,:v5)');
Parameters.ParamByName('v1').Value:=edit1.Text;
Parameters.ParamByName('v2').Value:=Edit2.Text;
Parameters.ParamByName('v3').Value:=edit3.Text;
Parameters.ParamByName('v4').Value:=Datetostr(Datetimepicker1.Date);
Parameters.ParamByName('v5').Value:=Edit5.Text; }
Try
Showmessage(sql.Text);
execsql;
Except
showmessage('SORRY,有错误发生,请重新尝试');
end;
错误提示:Project Project1.exe raised exception class EOleException with message'insert into 语句的语法错误。'Process stopped.Ues step or run to continue.
请帮帮忙~~~~
begin
Sql.Clear;
Sql.Add('insert into input1 (inputno,name,amount,date,memo)valuesv1,:v2,:v3,:v4,:v5)');
parameters.ParamByName('v1').Value:=Trim(edit1.Text);
parameters.ParamByName('v2').Value:=Trim(edit2.Text);
Parameters.ParamByName('v3').Value:=Trim(edit3.Text);
Parameters.ParamByName('v4').Value:=datetostr(datetimepicker1.Date);
parameters.ParamByName('v5').Value:=Trim(edit5.Text);
{ Sql.Add('insert into input1 (inputno,name,amount,date,memo) values v1,:v2,:v3,:v4,:v5)');
Parameters.ParamByName('v1').Value:=edit1.Text;
Parameters.ParamByName('v2').Value:=Edit2.Text;
Parameters.ParamByName('v3').Value:=edit3.Text;
Parameters.ParamByName('v4').Value:=Datetostr(Datetimepicker1.Date);
Parameters.ParamByName('v5').Value:=Edit5.Text; }
Try
Showmessage(sql.Text);
execsql;
Except
showmessage('SORRY,有错误发生,请重新尝试');
end;
错误提示:Project Project1.exe raised exception class EOleException with message'insert into 语句的语法错误。'Process stopped.Ues step or run to continue.
请帮帮忙~~~~