ADO Access TZQuery DBGrid not updateable

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
cmatrix
Junior Boarder
Junior Boarder
Posts: 29
Joined: 20.10.2005, 21:43
Contact:

ADO Access TZQuery DBGrid not updateable

Post by cmatrix »

I'm using Zeos with ADO to hook into an Access database. I have a DBGrid connected to a ZQuery. This works fine with Zeos and the SQLite driver. I can do edits in the grid, add records etc. Switching to Zeos/Ado/Access though, on trying to edit a field I get the EOleException error: 'Operation must use an updateable query'.

If I add a TZUpdateSQL object and hook it to the query the error goes away but no record changes are saved.

When I use TADOQuery instead of Zeos I can do such grid edits with no such problems.

Am I setting something wrong?
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: ADO Access TZQuery DBGrid not updateable

Post by marsupilami »

Hello cmatrix,

it seems that Zeos cannot determine the queries necessary to update your tables in an automatic fashion. If you use TZUpdateSQL, you can provide the necessary sql queries yourself. If you don't provide them, nothing will happen...
Best regards,

Jan
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: ADO Access TZQuery DBGrid not updateable

Post by miab3 »

@cmatrix, @marsupilami,

Another reason may be the lack of setting Mode = ReadWrite in ADO-jet configuration.

Michal
cmatrix
Junior Boarder
Junior Boarder
Posts: 29
Joined: 20.10.2005, 21:43
Contact:

Re: ADO Access TZQuery DBGrid not updateable

Post by cmatrix »

That's it Michal, setting Mode = ReadWrite did the trick. Thanks. Funny though that it worked OK with TADOQuery with the exact same connection string.
Post Reply