向SQL中插入数据
方法一:
ADOQtemp.Close; ADOQtemp.Connection := DM.ADOConnection1; ADOQtemp.SQL.Clear; ADOQtemp.Parameters.Clear;
ADOQtemp.SQL.Add('insert into LabelMainInfo() select * from tempLabelMainInfo where OperatorNO=:a ');
ADOQtemp.Parameters.ParamByName('a').Value := gOperatorNO;
ADOQtemp.ExecSQL;
方法二:
ADOQtemp.Close; ADOQtemp.SQL.Clear; ADOQtemp.Parameters.Clear;
ADOQtemp.SQL.Add('insert into WorkingRecord(BH,OperatorNO,OperatorDate,OperatorType,isChecked) values(:aBH,:aOperatorNO,:aOperatorDate,:aOperatorType,:aisChecked)');
ADOQtemp.Parameters.ParamByName('aBH').Value := tempMaxNo; //当前编号
ADOQtemp.Parameters.ParamByName('aOperatorNO').Value := gOperatorNO; //操作员编号
ADOQtemp.Parameters.ParamByName('aOperatorDate').Value := RzDateTimeEditDanJu.date; //操作日期
ADOQtemp.Parameters.ParamByName('aOperatorType').Value := '成品出库单'; //单据类型
ADOQtemp.Parameters.ParamByName('aisChecked').Value := 0; //单据是否审核
ADOQtemp.ExecSQL;