Board index » delphi » Trouble using Refresh

Trouble using Refresh

Hi,

    I am using Delphi 3 CS and MSSQL 6.5.
    I am accessing tables using TQuery components.
    I want refresh my tables using TQuery.Refresh, but I receive an
EDBEngine Error: "Table does not support this operation because it is not
uniquely indexed".
    What can I do about this?

Thanks.

 

Re:Trouble using Refresh


Refresh doesn't work with TQuery.
So, just Close and re-open the Query.

Nelson Henrique Corra Nepomuceno <n...@imagenet.com.br> wrote in article
<71m4v3$5j...@forums.borland.com>...

Quote
> Hi,

>     I am using Delphi 3 CS and MSSQL 6.5.
>     I am accessing tables using TQuery components.
>     I want refresh my tables using TQuery.Refresh, but I receive an
> EDBEngine Error: "Table does not support this operation because it is not
> uniquely indexed".
>     What can I do about this?

> Thanks.

Re:Trouble using Refresh


I created a unique index and I tried call TQuery.Refresh but I received a
EDBEngineError: "Table does not support this operation because it is not
uniquely indexed". What do I need to do after create the unique index ?

Michel Santos escreveu na mensagem <363F6766.97339...@manhattantech.com>...
    Closing and opening the TQuery does pretty much what Refresh does.
    If you don't like this solution, you could also try placing a unique
index on the records.  (I know, I know, put one on even if you already have
a primary key.  This seems to solve the problem around half of the time.)

    Michel

Other Threads