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?
ADO Access TZQuery DBGrid not updateable
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: ADO Access TZQuery DBGrid not updateable
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
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
@cmatrix, @marsupilami,
Another reason may be the lack of setting Mode = ReadWrite in ADO-jet configuration.
Michal
Another reason may be the lack of setting Mode = ReadWrite in ADO-jet configuration.
Michal
Re: ADO Access TZQuery DBGrid not updateable
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.