Still studing zeoslib, now zquery.
I would like a help, I am not understanding datasource property in zquery component.
To me I can reference a field in another dataset and maybe in another connection, but I can't find any doc about.
I know that is not for use master/detail 'cause I have masterdatasource property to do that.
So, someone can help me?
What is zquery.datasource and how to use it?
zquery.datasource what is it? how to use it?
Re: zquery.datasource what is it? how to use it?
DataSource in ZQuery(detail) is used to link master-detail using SQL(in detail) "select * from tdetail where Field1_tdetail =:Field2_tmaster"
And it generates the appropriate query every time the position of the master cursor changes.
MasterSource works in conjunction with MasterFields and Linked Fields and ZTable or ZQuery(in detail) using SQL "select * from tdetail".
And it works on downloading all data to the client at once.
It can be said that it filters out detail every time the position of the master cursor changes.
It is a master-detail link on local data.
Michał
And it generates the appropriate query every time the position of the master cursor changes.
MasterSource works in conjunction with MasterFields and Linked Fields and ZTable or ZQuery(in detail) using SQL "select * from tdetail".
And it works on downloading all data to the client at once.
It can be said that it filters out detail every time the position of the master cursor changes.
It is a master-detail link on local data.
Michał
Re: zquery.datasource what is it? how to use it?
I tried several times but it does not recognize fields on second datasource(detail).
There is a secret to use :field_datasource2?
There is a secret to use :field_datasource2?
Re: zquery.datasource what is it? how to use it?
It is a field name from the master table.
E.g.
ZQuery_master: tmaster - idm, valuem - select * from tmaster
ZQuery_detail: tdetail - idd, valued, idmd - select * from tdetail where idmd=:idm
ZQuery_detail.DataSource:=DataSource_master;
Michał
E.g.
ZQuery_master: tmaster - idm, valuem - select * from tmaster
ZQuery_detail: tdetail - idd, valued, idmd - select * from tdetail where idmd=:idm
ZQuery_detail.DataSource:=DataSource_master;
Michał
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: zquery.datasource what is it? how to use it?
Note: This is also documented to some degree in chapter 2.6.1 (Master/Detail with server sided filters) of the Zeos documentation collection
Server side filters meaning that the filter is applied on the server side before data is fetched to the client.
Server side filters meaning that the filter is applied on the server side before data is fetched to the client.