A
avay
Unregistered / Unconfirmed
GUEST, unregistred user!
写了以下一段代码,执行后day_temp表中没有填加任何记录,不明所以,特请教各位大虾
procedure Tshjdform.BitBtn2Click(Sender: TObject);
var
tt:string;
begin
tt:=formatdatetime('mm/dd/yyyy',datetimepicker1.datetime);
query3.DataSource:=dbmo.daytemp_so;
query3.SQL.Clear;
query3.SQL.Add('insert into day_temp select * from day where tradedate=:dd');
query3.ParamByName('dd').value:=copy(tt,1,2)+'/'+copy(tt,4,2)+'/'+copy(tt,7,4);
query3.Prepare;
query3.ExecSQL;
end;
procedure Tshjdform.BitBtn2Click(Sender: TObject);
var
tt:string;
begin
tt:=formatdatetime('mm/dd/yyyy',datetimepicker1.datetime);
query3.DataSource:=dbmo.daytemp_so;
query3.SQL.Clear;
query3.SQL.Add('insert into day_temp select * from day where tradedate=:dd');
query3.ParamByName('dd').value:=copy(tt,1,2)+'/'+copy(tt,4,2)+'/'+copy(tt,7,4);
query3.Prepare;
query3.ExecSQL;
end;