Page 1 of 1

ADO Access TZQuery DBGrid not updateable

Posted: 13.04.2014, 00:38
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?

Re: ADO Access TZQuery DBGrid not updateable

Posted: 13.04.2014, 10:23
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

Re: ADO Access TZQuery DBGrid not updateable

Posted: 13.04.2014, 11:55
by miab3
@cmatrix, @marsupilami,

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

Michal

Re: ADO Access TZQuery DBGrid not updateable

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