Steve,
- Original Message -
From: <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Monday, December 06, 2004 1:00 PM
Subject: Re: Foreign Key Error 1005:150
--NextPart_Webmail_9m3u9jl4l_14802_1102330771_0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
M
Dear Steve!
You must set the column address_id as primary key in the table
person_address. That should solve your problem.
Generally table, you want to join with foreign key, should have primary key.
The primary key should include the column that you use for the foreig
Michael,
Thank you for your reply. Here is a bit more info. I changed the default
table type to innodn in the my.ini file before creating the database, so all
tables are innodb. I tried the create statements with and without explicit
index clauses with all permutations - same result each tim
Something is wrong, but it's hard to say what. It seems unlikely you entered
exactly those commands and got an error only on the last ALTER TABLE.
First, you need InnoDB tables to support foreign keys, but you don't specify
the table engine in your CREATE statements. The default is MyISAM, unle
Steve,
which MySQL version did you use? Both statements work with MySQL-4.1.8 on
Linux.
[EMAIL PROTECTED]:~/mysql-4.1/client> ./mysql test
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.8-debug-log
Type 'help;' or '\h' for help. Type