Board index » delphi » Problems with editing TQuery

Problems with editing TQuery

Hello!
I have a problem, when I try to edit my TQuery, because it has "ORDER
BY" in SQL-statement. If  I use this statement, I get an error "Can't
modify a read-only DataSet", but CanModify property is set to True. If
i don't sort records in Query everything is OK.
 Is there any way to solve this problem?

     Thanks in advance
                                         Mariya.

 

Re:Problems with editing TQuery


Cached updates is your only choice in this scenario.

Craig

Quote
Dmitry Ustsov <ust...@inion.ru> wrote in message news:3821520E.C44397D7@inion.ru...
> Hello!
> I have a problem, when I try to edit my TQuery, because it has "ORDER
> BY" in SQL-statement. If  I use this statement, I get an error "Can't
> modify a read-only DataSet", but CanModify property is set to True. If
> i don't sort records in Query everything is OK.
>  Is there any way to solve this problem?

>      Thanks in advance
>                                          Mariya.

Re:Problems with editing TQuery


Order By will usually return a non live result set.  You can attach a TUpdateSQL
component to tell the query how it should be updated.

Quote
Dmitry Ustsov wrote:

> Hello!
> I have a problem, when I try to edit my TQuery, because it has "ORDER
> BY" in SQL-statement. If  I use this statement, I get an error "Can't
> modify a read-only DataSet", but CanModify property is set to True. If
> i don't sort records in Query everything is OK.
>  Is there any way to solve this problem?

>      Thanks in advance
>                                          Mariya.

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
Anyone who cannot cope with mathematics is not fully human.
At best he is a tolerable subhuman who has learned to wear
shoes, bathe and not make messes in the house.   (Heinlein)

Other Threads