Solved

Editing data within a client data set

Posted on 2002-06-18
4
163 Views
Last Modified: 2010-04-04
Hi guys,

I am wondering if you could help.  I am using a TSQLClientDataSet to pull data from several tables.  I have added two additional columns to the TSQLClientDataSet and you like to add data to these columns once the initial retrieve has occurred.  Any ideas on how to do this?  

Cheers,
Paul
0
Comment
Question by:gtbikeuk
[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
4 Comments
 
LVL 1

Accepted Solution

by:
Kristian earned 200 total points
ID: 7088483
Hi Paul,

You can update a TClientDataSet just like a TTable,
if your using DB controls then its easy and use TDataSource, otherwise by code just goto the row you want and update the Data.

For Updating a row Use :

FClientDataSet.Edit;
FClientDataSet[ColName] := Value;
FClientDataSet.Post;

For Adding a row and editing it Use :

FClientDataSet.Append;
FClientDataSet[ColName] := Value;
FClientDataSet.Post;

(Note : FClientDataSet[ColName] is the same as FClientDataSet.Fields[ColName]  )

Kristian

0
 
LVL 4

Expert Comment

by:YodaMage
ID: 7089017
Keep one thing in mind. If you are creating a CDS with data from a join or union, you can add data to that CDS as shown above, but you CANNOT .applyupdates, so the data you add cannot post to the server.
0
 

Expert Comment

by:CleanupPing
ID: 9343185
gtbikeuk:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 9453447
gtbikeuk,
No comment has been added lately (17 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to Kristian http:#7088483

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

anAKiN
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

729 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