Solved

Creating Paradox Tables

Posted on 1999-01-20
3
250 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
  • 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi : could not find program, '...exe' 2 165
Downloading email attachments 2 73
how to send memory stream from ics Client To ics server ? 11 105
Delphi inherited method 6 67
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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 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