Page 1 of 1

Zeos + Clientdataset + FireBird + Apllyupdates = error

Posted: 26.12.2005, 12:27
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

Posted: 26.12.2005, 19:05
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.

Zeos + Midas

Posted: 27.12.2005, 12:00
by alexdefaro
It´s a hell of a work ;)

Ok, Ill try that.

thank´s for your help Guillermo.

Alex

Posted: 27.12.2005, 12:15
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

Posted: 03.06.2006, 08:07
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