Send SQL to Query using Delphi 6 or 7

produsysprodusys 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! ;)

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 11:17AM
    create a var of required type
    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.
    ;)
  • produsysprodusys Brazil
    edited 11:17AM
    OK, tanks!
  • produsysprodusys Brazil
    edited February 2005
    I'm having a following error: 'Resource FR_IBXTABLECONTROL not found'.
    Why this error? ;)

    ** Resolved **
    Because My DataBase name is IBDataBase1 and not DataBase, I believe that they are the configurations of my project!! ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.