AutoRefresh Error 'Unique keyfields required'

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Frega
Posts: 8
Joined: Thu 23 Apr 2009 18:44

AutoRefresh Error 'Unique keyfields required'

Post by Frega » Thu 16 Jul 2009 18:41

Hello, again :oops:

I have a TMyQuery named: qPedido, with the following script:

Code: Select all

Select c.email1,c.email_status,c.email_aprovado,c.email_format,c.email_copy,c.email_copy_liberar,p.pedido_cliente,p.pedido_representante,p.cancelado,p.cliente,p.data,p.dataprevisao,p.pedido,p.representante,p.aprovado,p.lote,p.estado, c.razao,u.descricao,e.descricao from pedidos p
inner join r_clientes c on c.id = p.cliente
inner join s_usuarios u on u.id = p.representante
inner join estado e on e.id = p.estado
order by p.pedido desc
limit :limit
when i do a a query.refresh in runtime it works OK, but, im tring to use a AutoRefresh
qPedido.autorefresh:=true;
qPedido.AutoRefreshInterval:=300;

but, when the AutoRefresh time comes, the application raise a exception:
"EDatabaseError with message 'Unique keyfields required'."


what is this? a bug or my mistake?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 21 Jul 2009 07:09

AutoRefresh executes the RefreshQuick method instead of the Refresh method if a recordset has timestamp fields.

Post Reply