How to create the following tables in paradox:
CREATE TABLE Supplier (
SupplierNumber INTEGER NOT NULL,
Name VARCHAR(20) NOT NULL,
Address VARCHAR(50) NOT NULL,
Type VARCHAR(10),
CONSTRAINT supplier_pk PRIMARY KEY(SupplierNumber),
CONSTRAINT number_value CHECK (SupplierNumber > 0) )
CREATE TABLE Invoices (
InvoiceNumber INTEGER NOT NULL,
SupplierNumber INTEGER NOT NULL,
Text VARCHAR(4096),
CONSTRAINT invoice_pk PRIMARY KEY(InvoiceNumber),
CONSTRAINT inumber_value CHECK (InvoiceNumber > 0),
CONSTRAINT supplier_fk FOREIGN KEY(SupplierNumber)
REFERENCES Supplier(SupplierNumber)
ON UPDATE CASCADE ON DELETE RESTRICT )
the CONSTRAINT SQL does not work.
Also when I create a table:
CREATE TABLE Supplier (
SupplierNumber INTEGER NOT NULL,
Name VARCHAR(20) NOT NULL,
Address VARCHAR(50) NOT NULL,
Type VARCHAR(10))
When I try to access the table in Paradox Version 4.0 message recieved:
"Supplier table is damaged"
When go into "Tutility" program I geta table format error:
The table header is corrupt, or
the Paradox file format for this
table is a later version than
TUTILITY 4.0 supports.
Was this table created by Paradox
3.5 or 4.0?
Hope you can answer these questions! I looked in your "FAQ" and doc files and could not find anything.
Thanks,
Vernon
|
>the CONSTRAINT SQL does not work.
It supports PRIMARY KEY, but doesn't support Foreign Keys and CONSTRAINT.
>Was this table created by Paradox 3.5 or 4.0?
You should try versionNumber=3 connection property.
versionNumber Paradox Version Number. You can use null, "3"(version 3.0), "3.5"(version 3.5),"4"(version 4.x), "5"(version 5.x), or "7"(version 7.x~11.x). This parameter is only used for CREATE TABLE. Default value: 7
|