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
Zeos + Clientdataset + FireBird + Apllyupdates = error
Moderators: gto, cipto_kh, EgonHugeist
-
- Fresh Boarder
- Posts: 3
- Joined: 26.12.2005, 12:16
- Location: Brasil
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.
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.
-
- Fresh Boarder
- Posts: 3
- Joined: 26.12.2005, 12:16
- Location: Brasil
Zeos + Midas
It´s a hell of a work ;)
Ok, Ill try that.
thank´s for your help Guillermo.
Alex
Ok, Ill try that.
thank´s for your help Guillermo.
Alex
-
- Fresh Boarder
- Posts: 3
- Joined: 26.12.2005, 12:16
- Location: Brasil
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
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