Send SQL to Query using Delphi 6 or 7
produsys
Brazil
Hi friends!!!
I'm have a little problem that I need to resolve!
Think you are using Delphi 6 or 7 for a system, in you system you are send an SQL command to TfrIBXQuery like: 'Select * from Company'. But this in execution time and for Delphi to FastReport.
It is possible? If not, how can I make it??
Thanks a lot!
I'm have a little problem that I need to resolve!
Think you are using Delphi 6 or 7 for a system, in you system you are send an SQL command to TfrIBXQuery like: 'Select * from Company'. But this in execution time and for Delphi to FastReport.
It is possible? If not, how can I make it??
Thanks a lot!
Comments
After loading report use findobject method
varname := frreport1.findobject('nameof object')
varname.sql:= 'yoursqlstatementstring';
or
varname.prop:= 'yoursqlstatementstring';
code to show or what ever.
care must be taken when building the sql statement string, Delphi strips single apostrophe's, also be careful that field names have not changed from what you used in report memos or you will get errors.
the best method is to write parameterized queries that use a variable for the parameter and just modify the variable when you load the report.
Why this error?
** Resolved **
Because My DataBase name is IBDataBase1 and not DataBase, I believe that they are the configurations of my project!!