MySQL Development
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Remember me

Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Add This Thread To:   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
Unread Dev Articles Community Forums Sponsor:
Old October 19th, 2008, 03:47 AM
graced graced is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
Join Date: Oct 2008
Posts: 1 graced User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 39 sec
Reputation Power: 0
MySQL ErrorNo: 150

Hi, i dont know what im doing wrong here. i always have the same error:

ERROR 1500 (HY0000): Cant Create table errno: 150 (for Foreign Keys)

can someone help me out? thanks.

here are my table statements:

create table campaigns(campaignname varchar(20) PRIMARY KEY,
companyname varchar(20),
teamcolor varchar(15),
priority varchar(20),
datereceived date,
datedue date,
status varchar(20),
projectmanager varchar(30));

create table builds(campaignname varchar(20),
buildname varchar(15),
adtype varchar(15),
complexity varchar(10),
category varchar(15),
FOREIGN KEY (campaignname) REFERENCES campaigns(campaignname) ON DELETE CASCADE,
PRIMARY KEY(campaignname,buildname));

create table tasks(campaignname varchar(20),
buildname varchar(15),
taskname varchar(15),
taskdetails varchar(50),
assignedto varchar(20),
dependenton varchar(15),
comments varchar(50),
lastupdate datetime,
PRIMARY KEY(taskname, buildname),
FOREIGN KEY (buildname) REFERENCES builds(buildname) ON DELETE CASCADE);

I get problems with the tasks table... what am i doing wrong here?

Reply With Quote

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > MySQL ErrorNo: 150

Developer Shed Advertisers and Affiliates

Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap