Fast Reports update query

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
wjm4
Posts: 72
Joined: Mon 12 Feb 2007 21:31

Fast Reports update query

Post by wjm4 » Sat 26 Jun 2010 04:09

I am trying to execute an insert query in the onafterprint event of a fast report. I have defined a new tfrxunidacquery on the data page of the report and am executing that method using q3.open(); in the onafterprint method. The query executes successfully, however it returns an error that says no records are returned for the query. Since it is an insert query, there are no records returned. How can I surpress the error (try, catch) or eliminate it all together. Thanks for the help

hughespa
Posts: 81
Joined: Sat 23 Aug 2008 08:36
Location: W. Australia

Post by hughespa » Sat 26 Jun 2010 12:16

Using q3.Open is the problem. Open is for when you expect a result set back. Use q.ExecSQL when you are executing a statement which doesn't return a result set but just executes the sql.

Regards, Paul.

Post Reply