0
There is a way for a Tibquery to receive the other Tibquery. For example:
Query1.Close;
Query1.Open;
Query2 := Query1;
if Query2Valor1.... // segue a lógica
0
There is a way for a Tibquery to receive the other Tibquery. For example:
Query1.Close;
Query1.Open;
Query2 := Query1;
if Query2Valor1.... // segue a lógica
1
With the IB
I believe it is not possible.
Already with the Firedac is possible through the TFDDataSetReference
, on which you can pass the property data
of a dataset to another as follows:
FDQuery2.Data := FDQuery1.Data;
But back to your reality, it would be possible to still pass the content of Tibquery for a Clientdataset by means of Datasetprovider.
I do not know if it is acceptable for your need, but I use quite this above mentioned feature.
Browser other questions tagged delphi delphi-7
You are not signed in. Login or sign up in order to post.
Confirming What You Want: A query receives data from the other query? Or Tfields? SQL?
– Andrey
A query receiving data from another Query.
– Tiago Casanova
@Tiagocasanova normally one component receives EVERYTHING from the other if it is the same class. That is, your example should already work!
– Junior Moreira
Query2valor1 does not work for example it does not bring any value.
– Tiago Casanova
@Júniormoreira I understand that the code exemplified by Tiago only makes Query2 point in memory to Query1, but Query2 does not receive data from Query1. With this technology (IB) reality is what I answered below...
– Andrey
is what @Andrey said, he can still take the values through the method
FieldByName()
since theTFields
is not copied (as already mentioned Query2 only references to Query1, it is not a copy)... the methodAssign()
if implemented makes the copy, ie creates a new reference... but if the classTIBQuery
to implement– JMSlasher