Zeos + Clientdataset + FireBird + Apllyupdates = error

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
alexdefaro
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 26.12.2005, 12:16
Location: Brasil

Zeos + Clientdataset + FireBird + Apllyupdates = error

Post by alexdefaro »

Hello everybody I need some help

I´m making a form with Delphi using this set

TZConnection
TZReadOnlyQuery
TDatasetProvider
TClintDataSet
TDataSource


I make updates and Post them with no problem, when I
execute the ApplyUpdates comman, get the folowing erroe;

"Unable to resolve records. Table name not found."

I´ve allready tried using ZQuery, RequestLive = True and got the same..

The SELECT statement is very simple

SELECT * FROM PEOPLE

thank's,

Alex

ps.

I've put the name of the table on the OnGetTablename event
but the message was;

ZReadOnlyQuery: SQL not suported: %s
gluquesan
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 20.12.2005, 04:12

Post by gluquesan »

Hi Alex. I work with D2005 and Postgresql 7.4 (updating to 8.1) using a similar approach (zeos-midas). Normally in your case I would do the following thing:

TZConnection -> TZQuery [ReadOnly = True and SQL in lowercase. Also, add all fields and mark the key field (if exists) using: ProviderFlags.pfInKey = True] -> TDatasetProvider [Options: IncFieldProps, PropagateChanges. Also UpdateMode = upWhereKeyOnly]
-> TClientDataSet [Add all fields too, mark the key field (similar to TZQuery)] -> TDataSource and your data control.

Code for insert, if the Clientdataset's name is CDS, then:
try
CDS.Insert;
CDS.FieldByName('lowercase_field_name').As[String, Variant, ...] := Value;
CDS.Post;
finally
if CDS.ApplyUpdates(0) > 0 then CDS.CancelUpdates;
end;


I hope that it serves to you as something.

Guillermo Luque y Guzman Saenz
Datamind S.A.
alexdefaro
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 26.12.2005, 12:16
Location: Brasil

Zeos + Midas

Post by alexdefaro »

It´s a hell of a work ;)

Ok, Ill try that.

thank´s for your help Guillermo.

Alex
alexdefaro
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 26.12.2005, 12:16
Location: Brasil

Post by alexdefaro »

Guillermo,

I did what you told me but I got the same error.
I'm, using D5 and Firebird 1.5.

do you have any other ideia??

my personal email is augusto@cmsolucoes.com.br

thank's

Alex
gluquesan
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 20.12.2005, 04:12

Post by gluquesan »

A few months ago... Maybe D5's provider can't resolve adecuatly. Maybe you can try with another delphi version (if you use D7, f.e. you can use dbexpress components to access the database, making an interbase connection).

Guillermo Luque y Guzman Saenz
LGS Ingenieria Ltda
Post Reply