asi
asked on
Paradox DDL
hello
Is there a way to receive from Paradox Sql - DDL -
i.e : the create query - to create table.
thank u
Asi
Is there a way to receive from Paradox Sql - DDL -
i.e : the create query - to create table.
thank u
Asi
ASKER
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
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
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(Ta ble1.Field Defs);
Table2.IndexDefs.Assign(Ta ble1.Index Defs);
Table2.CreateTable ;
end;
Best Regards.
Marcos.
procedure TForm1.Button1Click(Sender
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(Ta
Table2.IndexDefs.Assign(Ta
Table2.CreateTable ;
end;
Best Regards.
Marcos.
ASKER
We try to convert paradox to oracle.
This way lead to many errors like fields does not exsist etc....
thank u
Asi
This way lead to many errors like fields does not exsist etc....
thank u
Asi
You could try Datapump that comes with Delphi...
or tbatchmove . . .
ASKER
tbatchmove . . is not very clear , is there any exmaple how to use it ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.