TZQuery could be an Unidirectional DataSet?

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
jdiasneto
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 08.10.2009, 18:19
Location: Brazil
Contact:

TZQuery could be an Unidirectional DataSet?

Post 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
João Dias de Carvalho Neto

Deseja saber sobre design patterns e patterns corporativos?
deseja ver exemplos, webcasts e código fonte?
vá a http://www.jdiasneto.blogspot.com
WorldWalker
Junior Boarder
Junior Boarder
Posts: 25
Joined: 10.10.2009, 18:57

Post 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.
jdiasneto
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 08.10.2009, 18:19
Location: Brazil
Contact:

Post 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
João Dias de Carvalho Neto

Deseja saber sobre design patterns e patterns corporativos?
deseja ver exemplos, webcasts e código fonte?
vá a http://www.jdiasneto.blogspot.com
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
alexeevd
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 01.11.2009, 18:47

Post 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
Post Reply