Solved

Creating Paradox Tables

Posted on 1999-01-20
3
252 Views
Last Modified: 2010-04-06
I want to write a routine that will create a paradox table (including indexes) based upon the structure of another paradox table.  How can I do this ?
0
Comment
Question by:johnclarke
[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
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 100 total points
ID: 1362495
Hi johnClarke,

What about the TBatchMove component with Copy?

info :

batCopy      Create the destination table based on the structure of the source table. If the destination already exists, the operation will delete it, and replace it with the new copy of the source.

Regards, Zif.

0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1362496
Hi johnClarke
Oops Zif was faster,


Table1 is source and active
Table2 is destination and inactive
both have the same Database entry

procedure TForm1.Button1Click(Sender: TObject);
begin
  Table1.IndexDefs.Update;
  Table2.FieldDefs.Assign(Table1.FieldDefs);
  Table2.IndexDefs.Assign(Table1.IndexDefs);
  Table2.TableName := Edit1.Text;
  Table2.CreateTable;
end;

meikl
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1362497
Hi johnclarke,

appendix, i've comment out, what i do
procedure TForm1.Button1Click(Sender: TObject);
begin
  Table1.IndexDefs.Update;  {retrieves all available indexes}
  Table2.FieldDefs.Assign(Table1.FieldDefs); {Copy FieldDefinitions}
  Table2.IndexDefs.Assign(Table1.IndexDefs); {Copy IndexDefinitions}
  Table2.TableName := Edit1.Text;  {Give a Name}
  Table2.CreateTable; {Create, existing table will be overwritten}
end;

meikl
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

752 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