Thanks!
 
Nanu

>>> "Ing. Edwin Cruz" <[EMAIL PROTECTED]> 10/03/2006 22:06:27 >>>

Ive found this on internet:
"If you re-create a table which was dropped, it has to have a
definition
which conforms to the foreign key constraints referencing it. It must
have
the right column names and types, and it must have indexes on the
referenced
keys, as stated above. If these are not satisfied, MySQL returns error
number 1005 and refers to errno 150 in the error message string."


Use show create table statement to see table definition (on both)...


Regards!




-----Mensaje original-----
De: Nanu Kalmanovitz [mailto:[EMAIL PROTECTED] 
Enviado el: Viernes, 10 de Marzo de 2006 01:35 p.m.
Para: mysql@lists.mysql.com
Asunto: FOREIGN KEYS


Hi!

Server system SBS (Novell Small Business suite) 6.5 sp 1 with MySQL
ver.
4.0.15a, PHP 4.2.3, all of them on same machine.

I just finished create a new DB called TIULIM (InnoDB) with 3 tables
(Sites,
Tracks & Pathes).

Now, using MySQL Query Browser ver. 1.1.15, I'm trying to build
FOREIGN
KEYS.

The above tool is generating the following query: 

ALTER TABLE `tiulim`.`pathes` ADD CONSTRAINT `FK_pathes_1` FOREIGN KEY
`FK_pathes_1` (`Site_ID`)
    REFERENCES `sites` (`Site_ID`)
    ON DELETE RESTRICT
    ON UPDATE RESTRICT,
ADD CONSTRAINT `FK_pathes_2` FOREIGN KEY `FK_pathes_2` (`Track_ID`)
    REFERENCES `tracks` (`Track_ID`)
    ON DELETE RESTRICT
    ON UPDATE RESTRICT;

After executing the query, it display the error message:

MySQL Error Number 1005
Can't create table './tiulim/#sql-84_169.frm' (errno: 150)

What is the problem? 
How to solve it?

TIA

Nanu







--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:   
http://lists.mysql.com/[EMAIL PROTECTED]


Reply via email to