Page 1 of 1
TZQuery could be an Unidirectional DataSet?
Posted: 08.10.2009, 18:42
by jdiasneto
Hi,
I´m trying to develop using Zeos + BDS2009, but the project scope requires Multi Tier, and consequently, Unidirectional datasets that provides communication with TClientDataSets.
I don´t know how to change the TZQuery to Unidirectional, and really I don´t know whetaver it´s supported
It´s possible to change a TZQuery in a Unidirectional DataSet?
Looking on TZQuery hierarchy, I could see that it´s implements TDataSet Class and on it has a public method called "isUnidirectional();", but it´s a read only method;
thanks for every help and sorry the bad English
Posted: 12.10.2009, 18:15
by WorldWalker
Hi,
What do you mean by unidirectionnal? Just reads and does not write? If so, just set the ReadOnly property of TZQuery to True, or use the predefiened item the TZReadOnlyQuery.
Posted: 13.10.2009, 12:39
by jdiasneto
Hi,
Unidirectional Datasets are like .net DataReader objects, fast for read and can move only in one direction (foward). This behavior possibilites that executed querys is more fast then Bidirectional Datasets, causes the backward cursor is not buffered in memory when the content is readed.
TSQLDataSet class in VCL of D6 and upper provides Unidirectional DataSets Objects. And IBO for Interbase and Firebird has a property Unidirectional : Boolean; that possibilites changes the default behavior of the current dataset;
My intent is to use Zeos Querys, (If Datasets could be unidirectionals) on my project, combined with TDataSetProvider objects and TClientDataSets Objects. Like in DbXpress suite.
Thanks for help
Posted: 14.10.2009, 00:34
by mdaems
Please have a look in the components layer of the zeoslib components and the delphi vcl source it inherits from.
I know Zeoslib knows in some way about 'Unidirectional' datasets. But I don't know much about them myself. As far as I understand it's more or less something we inherit from the base TDataset class. I don't know the zeoslib specific implementation of it. So I can on,ly point you to the right part of the library.
It would be nice if you could report on this forum about your results. If it's worth a 'knowledge base' article, don't hesitate to write one.
Mark
Posted: 04.11.2009, 15:49
by alexeevd
mdaems wrote:
It would be nice if you could report on this forum about your results. If it's worth a 'knowledge base' article, don't hesitate to write one.
Mark
I have related task and got Unidirecional whith 6.6.4.
property IsUniDirectional - must be writable - i just hack it.
TZAbstractRODataset.GetRecord - imho, must be changed for using same buffer for all if IsUniDirectional.
TZAbstractRODataset.PSStartTransaction, TZAbstractRODataset.PSEndTransaction - incorrect transaction handling for midas.
see my post
http://zeos.firmos.at/viewtopic.php?t=2585