Board index » delphi » Local SQL cant edit in DBGRID after ORDER BY in a TQuery

Local SQL cant edit in DBGRID after ORDER BY in a TQuery

Im using a paradox table and all is fine until i sort with ORDER BY. After
that the TQuery switshes to "READ ONLY" and i cant edit the table anymore. I
have a "clean" projekt with only a dbgrid, datasource and Tquery using
DBdemos example. Is it not possible to edit a TQuery if its sorted? Where
can i read more?

Regards, P?r

 

Re:Local SQL cant edit in DBGRID after ORDER BY in a TQuery


Result sets from a query may or may not be editable. The example you're
mentionning is typical. Check the read only property to find out if it is. I
believe your mileage may vary depending on the DB you are using.

--

Alain Quesnel
cinqsanss...@compuserve.com

------

Quote
"Per T?rnell" <per.torn...@detectus.se> wrote in message

news:3b98d5ad_2@dnews...
Quote
> Im using a paradox table and all is fine until i sort with ORDER BY. After
> that the TQuery switshes to "READ ONLY" and i cant edit the table anymore.
I
> have a "clean" projekt with only a dbgrid, datasource and Tquery using
> DBdemos example. Is it not possible to edit a TQuery if its sorted? Where
> can i read more?

> Regards, P?r

Re:Local SQL cant edit in DBGRID after ORDER BY in a TQuery


You can make your read-only query editable by using a TUpdateSQL component.
It's on the BDE tab.

--
Michael Rodriguez
Compeat Restaurant Accounting Systems
http://www.compeat.com
m...@compeat.com

Quote
"Per T?rnell" <per.torn...@detectus.se> wrote in message

news:3b98d5ad_2@dnews...
Quote
> Im using a paradox table and all is fine until i sort with ORDER BY. After
> that the TQuery switshes to "READ ONLY" and i cant edit the table anymore.
I
> have a "clean" projekt with only a dbgrid, datasource and Tquery using
> DBdemos example. Is it not possible to edit a TQuery if its sorted? Where
> can i read more?

> Regards, P?r

Re:Local SQL cant edit in DBGRID after ORDER BY in a TQuery


Hi Per,

check if you indexed the field you try to "order by" clause if you use a
flat file database.

Regards,
Umit A. DURSUN
____________________________________________________________________

Quote
"Per T?rnell" <per.torn...@detectus.se> wrote in message

news:3b98d5ad_2@dnews...
Quote
> Im using a paradox table and all is fine until i sort with ORDER BY. After
> that the TQuery switshes to "READ ONLY" and i cant edit the table anymore.
I
> have a "clean" projekt with only a dbgrid, datasource and Tquery using
> DBdemos example. Is it not possible to edit a TQuery if its sorted? Where
> can i read more?

> Regards, P?r

Other Threads