Solved

Alter structure of TCientDataSet

Posted on 2008-06-20
2
334 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 37

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 Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

829 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