Solved

Paradox DDL

Posted on 2002-07-10
8
472 Views
Last Modified: 2012-06-27
hello

Is there a way to receive from Paradox Sql - DDL -
i.e : the create query - to create table.

thank u
Asi
0
Comment
Question by:asi
[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
  • 2
  • 2
  • +1
8 Comments
 
LVL 3

Expert Comment

by:marcoszorrilla
ID: 7144162
Read this information from Paradox.

CREATE TABLE is supported with the following limitations:

Column definitions based on domains are not supported.
     Constraints are limited to PRIMARY KEY for Paradox tables. Constraints are unsupported in dBASE tables.

For example, the following statement creates a Paradox table with a PRIMARY KEY constraint on the LAST_NAME and FIRST_NAME columns:

CREATE TABLE "employee.db"
     (
     LAST_NAME CHAR(20),
     FIRST_NAME CHAR(15),
     SALARY NUMERIC(10,2),
     DEPT_NO SMALLINT,
     PRIMARY KEY(LAST_NAME, FIRST_NAME)
     )

The same statement for a dBASE table should omit the PRIMARY KEY definition:

CREATE TABLE "employee.dbf"
     (
     LAST_NAME CHAR(20),
     FIRST_NAME CHAR(15),
     SALARY NUMERIC(10,2),
     DEPT_NO SMALLINT
     )

Creating Paradox and dBASE tables

You create a Paradox or dBASE table using Local SQL by specifying the file extension when naming the table:

".DB" for Paradox tables
     ".DBF" for dBASE tables

If you omit the file extension for a local table name, the table created is the table type specified in the Default Driver setting in the System page of the BDE Configuration Utility.



Best Regards.
Marcos.
0
 

Author Comment

by:asi
ID: 7144234
perhaps my question was not clear.
My purpose is to receive from existing paradox table the CREATE TABLE statment , this way i can more easily copy the table structure of paradox to other database
0
 
LVL 3

Expert Comment

by:marcoszorrilla
ID: 7144481
With code yes, but DDL I'm not sure.

procedure TForm1.Button1Click(Sender: TObject);
var
 Table2  : TTable;
begin
 Table1.FieldDefs.Update;
 Table1.IndexDefs.Update;
 Table2 := TTable.Create(nil);
 Table2.DatabaseName := Table1.DatabaseName;
 Table2.TableName := 'NewTable';
 Table2.TableType := Table1.TableType;
 Table2.FieldDefs.Assign(Table1.FieldDefs);
 Table2.IndexDefs.Assign(Table1.IndexDefs);
 Table2.CreateTable ;
end;

Best Regards.
Marcos.

0
Technology Partners: 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!

 

Author Comment

by:asi
ID: 7145297
We try to convert paradox to oracle.
This way lead to many errors like fields does not exsist etc....

thank u
Asi
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 7146971
You could try Datapump that comes with Delphi...
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7179544
or tbatchmove . . .
0
 

Author Comment

by:asi
ID: 7179564
tbatchmove . . is not very clear , is there any exmaple how to use it ?
0
 
LVL 8

Accepted Solution

by:
TOndrej earned 25 total points
ID: 7179567
yes, see Help\Examples\BatchMv and BatchMv2 subdirectories
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
Delphi Spellcheck in Webbrowser 1 52
oracle global variables 4 80
Delphi inherited method 6 80
Unique identifier on a terminal server (rdp) 4 75
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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…

726 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