Recent

Author Topic: field from dynamic sql  (Read 1657 times)

Sanchoyzer

  • Jr. Member
  • **
  • Posts: 65
field from dynamic sql
« on: May 04, 2015, 02:38:58 pm »
Hello!
The manual ( http://wiki.freepascal.org/LazReport_Tutorial ) says that we need to write
Code: [Select]
[SQLQuery1."NAME"] in data-band if we want to take value from database. In this way SQLQuery1 must be on Form1. What do I should to do if my SQLQuery1 is property of TMyClass and it is created dynamically?
Code: [Select]
TMyClass = class
public
var
  SQLQuery1: TSQLQuery;

...

MyClass := TMyClass.Create(...)
MyClass.SQLQuery1.SQL.Text := 'select * from TEST';
MyClass.SQLQuery1.Active := true;

...

[MyClass.SQLQuery1."NAME"]  in data-band  // fail

alexs75

  • Full Member
  • ***
  • Posts: 106
Re: field from dynamic sql
« Reply #1 on: May 06, 2015, 09:24:03 am »
LazReport work with dataset placed on form or datamodule in you project.


Sanchoyzer

  • Jr. Member
  • **
  • Posts: 65
Re: field from dynamic sql
« Reply #2 on: May 06, 2015, 02:00:02 pm »
thanks  :)

 

TinyPortal © 2005-2018