[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Editing data within a client data set

Posted on 2002-06-18
4
Medium Priority
?
174 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 800 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
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