Board index » delphi » Problem with TQuery - SQL Server

Problem with TQuery - SQL Server

I'm using TQuery to entering data into one of my tables.
I setted the property Request Live to True and I'm using TUpdateSQL to
provide the scripts for Insert, Update and Delete.
The problem happens when I click the "Cancel" button during an Insert or
Edit operation. When I do that I receive the message:

"Table does not support this operation because it is not uniquely indexed."

But the table have a primary index and with TTables this problem does not
happen.

Some tip ?

Ricardo(g...@nutecnet.com.br)

 

Re:Problem with TQuery - SQL Server


This usually happens when you are asking a dataset for "Refresh" (not supported
on TQueries). Maybe one of your controls does this.

BTW - you don't need RequestLive to be true with CachedUpdates enabled.
Execution will be faster if RequestLive is False;

Didzis

Quote
GCE wrote:
> I'm using TQuery to entering data into one of my tables.
> I setted the property Request Live to True and I'm using TUpdateSQL to
> provide the scripts for Insert, Update and Delete.
> The problem happens when I click the "Cancel" button during an Insert or
> Edit operation. When I do that I receive the message:

> "Table does not support this operation because it is not uniquely indexed."

> But the table have a primary index and with TTables this problem does not
> happen.

> Some tip ?

> Ricardo(g...@nutecnet.com.br)

Re:Problem with TQuery - SQL Server


Thanks.
You're right!

Didzis Klavins escreveu na mensagem <364880AE.3AB08...@batsoft.lv>...

Quote
>This usually happens when you are asking a dataset for "Refresh" (not
supported
>on TQueries). Maybe one of your controls does this.

>BTW - you don't need RequestLive to be true with CachedUpdates enabled.
>Execution will be faster if RequestLive is False;

>Didzis

>GCE wrote:

>> I'm using TQuery to entering data into one of my tables.
>> I setted the property Request Live to True and I'm using TUpdateSQL to
>> provide the scripts for Insert, Update and Delete.
>> The problem happens when I click the "Cancel" button during an Insert or
>> Edit operation. When I do that I receive the message:

>> "Table does not support this operation because it is not uniquely
indexed."

>> But the table have a primary index and with TTables this problem does not
>> happen.

>> Some tip ?

>> Ricardo(g...@nutecnet.com.br)

Other Threads