Solved

Creating Paradox Tables

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Find and Replace Stream with 0s 8 69
Delphi...Split view - idea? 1 90
Multi-layered image in FireMonkey 9 49
firemonkey keyboard covers the controls 1 37
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…
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…
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…

828 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