dbimport error 525
Posted in 1996
While importing database via dbimport
error 525 Failure to satisfy referential constraint...
occurs.
The problem is that the error appears while trying
to run: alter table aaa add constraint ( foreign key ...)
on columns
with containing null values ( declared as not null and varchar(3,0))
I have check unload_file via hd ( hexadecimal dump ) and
od -h ( hexa.dump) and the unload file is good
There are real null values.I have tried several
sequences how to repair it
1. drop table , create foreign key and load data
2. drop table , load data and add foreign key
1. was succesfull
It is possible to do it this way but it makes me confused because
where i run dbimport next time the same errors appear again
and on the same tables or sometimes
on different tables ( that were good in the first dbimport)
I found out that it appears only on columns
declared as varchar().
I have changed all columns that are primary keys and of course
referenced foreign key to simple char and there were no problems
Is it good to use varchar for columns used as primary key ??
According to that experience i would not recommend .
Or it it some bug ???
We are running in V 5.01 U.
thank you for any experience with varchar as primary key
--
Katarina Hamzova Voice : +42 7 3783200
SWH s.r.o Bratislava Fax : +42 7 377433
Slovakia
Internet : Katarina.Hamzova@swh.sk