Cannot update this query type

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
WorldWalker
Junior Boarder
Junior Boarder
Posts: 25
Joined: 10.10.2009, 18:57

Cannot update this query type

Post by WorldWalker »

Hi,
Everytime I try to delete a record I get this error "Cannot update this query type". I am using D2010 Pro and Zeos Alpha.716.

Thanks.
WorldWalker
Junior Boarder
Junior Boarder
Posts: 25
Joined: 10.10.2009, 18:57

Post by WorldWalker »

Hi All,
I've just realized that the error occurs in a random way, it works with some queries fine and with others the error is shown when I attempt to update, insert or delete.

I'm using Postgres 8.4.1

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

Post by mdaems »

WorldWalker,

Are all these queries without join and using a primary key?

If yes, this may mean there's some problem with the code parsing the query and/or getting the resultsetmetadata, deciding it's a readonly query. I'm not using D2010 nor postgres... i'm afraid you're a little on your own.

Mark
Image
WorldWalker
Junior Boarder
Junior Boarder
Posts: 25
Joined: 10.10.2009, 18:57

Post by WorldWalker »

Yes, just elementary queries and using primary key.
I'd even avoided to call "order by" and recreated empty tables to understand this behavior but I failed.
I'm still trying,
Thanks ever so much for your reply.
Dali
Junior Boarder
Junior Boarder
Posts: 30
Joined: 08.02.2010, 14:36

Post by Dali »

Have you solved this issue?

I noticed this error happened on my queries when they were UPPERCASED.

i.e., this will result in a readonly dataset:

Code: Select all

SELECT * FROM Customer
ORDER BY CustomerCode ASC
... while this other piece of SQL code won't:

Code: Select all

select * from customer
order by customercode asc
Kinda weird... But we were brave enough to become alpha-testers, you know.

Now I'm struggling with the codepages... Text in foreign languages won't display correctly in Delphi 2010 + ZeosLib 7... But in Delphi 6 + ZeosLib 6 it did.
User avatar
Pitfiend
Senior Boarder
Senior Boarder
Posts: 68
Joined: 12.12.2009, 07:27

Post by Pitfiend »

If the error only happens when you wrote your queries in uppercase, then it's an engine configuration issue. You must check how the postgres server is configured, and try to set it to use case insensitive configuration.
Dali
Junior Boarder
Junior Boarder
Posts: 30
Joined: 08.02.2010, 14:36

Post by Dali »

Nope, it's correctly configured. In fact, it works like a charm with my old app (same code, but prior to migration, using older versions of Zeos and Delphi).
Locked