Solved

Creating Paradox Tables

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

Industry Leaders: 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!

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

624 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