473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Can't create table

I get this error when I try to create the following tables:
ERROR 1005 (HY000): Can't create table '.\haps\transcript.frm' (errno: 150)

create table teaching (
ProfId int,
CrsCode varchar(10),
Semester varchar(10),
primary key(ProfId, CrsCode, Semester)
) engine=InnoDB;
create table transcript (
StudId int,
CrsCode varchar(10),
Semester varchar(10),
primary key(StudId, CrsCode, Semester),
foreign key(CrsCode, Semester) references teaching(ProfId, CrsCode,
Semester)
) engine=InnoDB;

What am I doing wrong??
Jul 23 '05 #1
2 2271
Stu
For starters, you're posting in the wrong newsgroup :)

Try posting in the MySQL newsgroups, rather than the SQL Server groups,
and they might be help to give you better insight. However, this link
might point you in the right direction.

http://www.mysqlusers.com/msg/11638.html

HTH,
Stu

Jul 23 '05 #2
Because you are in MySql
"blumi" <te**@me.com> a écrit dans le message de news:
d9**********@news.net.uni-c.dk...
I get this error when I try to create the following tables:
ERROR 1005 (HY000): Can't create table '.\haps\transcript.frm' (errno:
150)

create table teaching (
ProfId int,
CrsCode varchar(10),
Semester varchar(10),
primary key(ProfId, CrsCode, Semester)
) engine=InnoDB;
create table transcript (
StudId int,
CrsCode varchar(10),
Semester varchar(10),
primary key(StudId, CrsCode, Semester),
foreign key(CrsCode, Semester) references teaching(ProfId, CrsCode,
Semester)
) engine=InnoDB;

What am I doing wrong??

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Phil Powell | last post by:
create table if not exists nnet_produkt_varegruppe ( nnet_produkt_varegruppe_id int not null auto_increment, primary key(nnet_produkt_varegruppe_id), nnet_produkt_varegruppe_navn varchar(255) not...
2
by: Jonathan | last post by:
I am looking for a simple way to check if a database table exists. I keep getting advice to use "Try.. Catch" and other error handling methods, but I obviously don't want to have to display an...
0
by: Morten Gulbrandsen | last post by:
USE company; DROP TABLE IF EXISTS EMPLOYEE; CREATE TABLE EMPLOYEE ( # PK SSN CHAR(9) NOT NULL, # FK SUPERSSN CHAR(9), DNO INT NOT NULL DEFAULT 1, CONSTRAINT EMPPK
4
by: Michael Jackson | last post by:
I have a stored procedure to create a table. In my program I want the user to name the table to be created, therefore I pass a parameter to the SP for the table name. I cannot get it to work. It...
3
by: Matthew Kramer | last post by:
How would be the best way to do this in Access? I have two tables. The first table has all the rows of data. The first column of this table has a country name, the second has a year and the...
19
by: davegb | last post by:
Have been trying, in my spare time, to create an Access db for the employees in my group for over a month. It surprised me when I read in the Access Bible that a relationship between the Primary...
5
by: Just Me | last post by:
Given a button name Btn_5 and Index=5 I want to do something like dim zz as string = Btn_??Index??.Text or given an array of buttons, do:
13
by: nyt | last post by:
I have a problem of number and text field. I got the database file(mdb) that contains many combo boxes used and its list values are created by "value list" For eg field Field name= 'furniture'...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
6
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1)...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.