Solved

Insert a new field in a paradox table during runtime.

Posted on 2003-11-10
6
439 Views
Last Modified: 2010-04-05
Hi all,

I want to insert a new field in a paradox table during runtime, without loosing any data in the table.
Can anyone help me?
0
Comment
Question by:svenj
  • 3
  • 3
6 Comments
 
LVL 7

Expert Comment

by:jconde
ID: 9715934
What about using a query to do so ?

ALTER TABLE "paradox_table.db" ADD [column_name] data_type

where data_type is one of the following:

alpha, number, money, short, long integer, BCD, date, time, timestamp, memo, formatted memo, graphic, OLE, logical, autoincrement, binary, and bytes
0
 
LVL 7

Expert Comment

by:jconde
ID: 9716071
procedure TForm1.Button1Click(Sender: TObject);
begin
  Query1.SQL.Text := 'ALTER TABLE customer ADD myfield char(40)';
  Query1.ExecSQL;
end;
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 500 total points
ID: 9716351
yep,
this would be the easiest, what jconde provides

you can also use the bde-api
see
http://info.borland.com/devsupport/bde/bdeapiex/dbidorestructure.html

example 10

meikl ;-)
0
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!

 
LVL 27

Expert Comment

by:kretzschmar
ID: 9721100
jconde, i post a q for you, watch out
0
 
LVL 7

Expert Comment

by:jconde
ID: 9722090
Meikl,

Thanks, but why did you do that ?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9722165
>Thanks, but why did you do that ?

because your suggestion is correct and was first,
so i think, its fair that you get also some points

go
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20794091.html

and post a comment there

meikl ;-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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