W
weixu_1985
Unregistered / Unconfirmed
GUEST, unregistred user!
添加按钮的sql语句如下
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('USE ZJZB INSERT INTO mission (id,repair_unit,company_Id,tank_Id,total_hour,total_mile,fault_behave,repair_quest,repair_condition,finish_date)values('''+edit2.Text+''','''+edit3.Text+''','''+edit4.Text+''','''+edit5.text+''','''+edit6.Text+''','''+edit7.Text+''','''+edit8.Text+''','''+edit9.Text+''','''+edit10.text+''','''+datetostr(datetimepicker1.Date)+'''');
ADOQuery1.SQL.Add('select * from mission');
ADOQuery1.Active:=true;
ADOQuery1.Open;
但是一添加数据按下录入按钮后,提示错误“在关键字select附近有语法错误”,请问怎么办
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('USE ZJZB INSERT INTO mission (id,repair_unit,company_Id,tank_Id,total_hour,total_mile,fault_behave,repair_quest,repair_condition,finish_date)values('''+edit2.Text+''','''+edit3.Text+''','''+edit4.Text+''','''+edit5.text+''','''+edit6.Text+''','''+edit7.Text+''','''+edit8.Text+''','''+edit9.Text+''','''+edit10.text+''','''+datetostr(datetimepicker1.Date)+'''');
ADOQuery1.SQL.Add('select * from mission');
ADOQuery1.Active:=true;
ADOQuery1.Open;
但是一添加数据按下录入按钮后,提示错误“在关键字select附近有语法错误”,请问怎么办