Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
ORDER BY = Cannot modify a read-only dataset? |
Sat, Apr 7 2018 3:14 PM | Permanent Link |
Hoken | Hi,
I have a simple query in a TEDBQuery. If I try to use "ORDER BY" the query becomes read only! Why is that, and how can I order my dataset and still have it editable? |
Sat, Apr 7 2018 4:19 PM | Permanent Link |
Raul Team Elevate | On 4/7/2018 3:14 PM, Hoken wrote:
> Hi, > I have a simple query in a TEDBQuery. If I try to use "ORDER BY" the query becomes read only! Why is that, and how can I order my dataset and still have it editable? > You likely need an index for the column(s) in the order by clause. See manual on how EDB determines whether result is sensitive or not https://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=Result_Set_Cursor_Sensitivity Raul |
Mon, Apr 9 2018 6:43 AM | Permanent Link |
Adam Brett Orixa Systems | Hoken
Rual is 100% correct. However, I would caution a bit against trying to design your application with "Sensitive" queries. It does work perfectly well, but as soon as you really build up a data-model for your applications with more complex data-relationships (JOINs etc.) "Sensitive" queries become impossible. I always use Read-Only queries, and then have commands within the application to fire SQL INSERT / UPDATE / DELETE statements for the current row the user is editing. This is more robust in my opinion. Also, as all the queries are Read-Only the process of locking rows in tables is more fully in your control as a programmer, which is also good. If you are working with Delphi there is a useful TClientDataset component which can help you to create UPDATE statements, also several other good third party components. |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |