TzDatasource

Freature requests from users for ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist, mdaems

Post Reply
sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

TzDatasource

Post by sfxcc »

Can i develop a TzDatasource to trigger error events to TzDatasource.


When we have a Tdatamodule used for all software we cant set error messages for specific purposes we dont know in which form we where and the "DbControls used to exec error".

So can i develop a TzDatasource and you set then

On procedure internaladd and internalupdate
begin
For each Tabledatasource = TzDatasource do
TzDatasource.OnPostError
TzDatasource.OnEditError
end

So we can catch the errors on the correct datasource to set actions to the datasource dependent Dbcontrols.
where's the code ..
sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

Post by sfxcc »

How can i get the primary key fields with Zeos ,

Can it be done a a zquery or zTable ?

Didnt find it , on paradox it works with fieldsdefs.
where's the code ..
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

sfxcc,

ZConUnicode.DbcConnection.GetMetadata.GetPrimaryKeys(const Catalog: string; const Schema: string; const Table: string): IZResultSet;

Does it very well...
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Or using the ZMetadata component. Then you get a pure TDataSet back.
But I suppose sfxcc wants to know if there's a property on the query result fields that indicate if the current field is part of the primary key.

Checking TZAbstractRODataset.InternalInitFieldDefs where we create TFieldDef information makes me think that's not the case. If there's a standard Delphi TFieldDefs property to contain this information it might be relatively easy to add this information.

Mark
Image
Post Reply