[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

editing record moves to the last in TClientDataSet

Posted on 2007-03-24
4
Medium Priority
?
270 Views
Last Modified: 2013-11-23
Editing a record in a TClientDataSet, causes it to move to the last. It should keep the current position!!!

(* edit recond n.10 *)
 Table3.RecNo:=10;
 Table3.Edit;
 Table3.Fields[1].AsInteger:=Random(100);
 Table3.Post;

(* close and reopen the table *)
 Table3.Close;
 Table3.Open;
(* now the 10th record moved to last!!!! *)
0
Comment
Question by:gianluca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 1500 total points
ID: 18800842
You need to have an index which will force desired order.
Another solution is to replace table with query in which You'll set some sort order.
0
 

Author Comment

by:gianluca
ID: 18806074
An index will affect the speed ?? I think it will slow Editing and Appending the records....
0
 
LVL 17

Expert Comment

by:mokule
ID: 18806168
Generally an index is added for raising speed and maintaining desireed order.
Some slow down while adding is the cost. In most cases it is a fracton of advantages.
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 18974153
    Hi!
Adding an index optimal to a sertain query speeds the retrieval of
the data. Same goes for a table objects.
If space allocations for the index is well designed then adding an insert
will have minimal affects on update and insert to the table.

Regards,
  Tomas Helgi
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question