Solved

Insert a new field in a paradox table during runtime.

Posted on 2003-11-10
6
440 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
[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
  • 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
Independent Software Vendors: 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

691 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