Solved

Alter structure of TCientDataSet

Posted on 2008-06-20
2
331 Views
Last Modified: 2010-04-05
Hi there,

I got a TClientDataSet, and I want to add another column to the table.

I tried doing this

fDB : TClientDataSet;
{ .. }
fDB.Close;
fDB.FieldDefs.Add('TypeResult', ftMemo, 0, false);
fDB.CreateDataSet;

But it blows away all my current data....

How can I add another column to the dataset without losing all the current info?
0
Comment
Question by:wildzero
2 Comments
 
LVL 36

Accepted Solution

by:
Geert Gruwez earned 500 total points
ID: 21836570
fDB.Close
clears all data

if the data comes from a query you can add it by changing the query with an extra column or a calculated field

if you manually added the data
create a new clientdataset with the extra column and copy the data from the old dataset to the new
0
 
LVL 10

Author Comment

by:wildzero
ID: 21840100
Yea that is what I have had to do.
Create a new TClientDataSet and move the data over.

:-/
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now