ExecSQL
Posted by: Jim Sawyer
Date: March 09, 2019 03:28PM

Why do I get a 'can't perform operation on a closed dataset' error on the following code?????

qRptStuff2 := TFDQuery.Create( AConnection );
with qRptStuff2 do
begin
Connection := AConnection;
SQL.Add( 'Insert into RptStuff2 (DateA,IntA,FloatA,StrA) values (:D,:I,:R,:DD)' );
ParamByName('D').AsDate := dDate;
ParamByName('I').AsInteger := InvDay;
ParamByName('R').AsFloat := RevDay;
ParamByName('DD').AsString := DateToStr( dDate );
ExecSQL;

Options: ReplyQuote


Subject
Written By
Posted
ExecSQL
March 09, 2019 03:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.