Ask a Question related to Coldfusion Database Access, Design and Development.
-
plarts #1
MySQL relationship
After a migration from Access to MySQL V5,
I have lost the Access relationship.
I tried to recreate them into MySQL, through declaration of foreign keys
and delete cascade.
When inserting my first data , I had this CF error :
Cannot add or update a child row: a foreign key constraint fails
(`stw/bout_famille`, CONSTRAINT `FK_bout_famille_1` FOREIGN KEY (`id_fam`)
REFERENCES `bout_fam_car` (`car_id_fam`) ON DELETE CASCADE)
The error occurred in
C:\Inetpub\wwwroot\clients\STW\site_on_line\admin_ boutique\create_famille_save.c
fm: line 87
85 : insert into bout_famille
86 :
(apellation_fam,code_fam,description_fam,active_fa m,order_fam,famille_fam,speci
fique,date_crea,gestion_stock,elec_file,activity)
87 : values
('#form.fam_name#','#form.fam_code#','#form.fam_de s#',#act#,#next_order#,#parent
#,#spec#,#createodbcdate(now())#,#stock#,#felec#,# activity#)
88 : </cfquery>
89 :
Can someone help me, to make me understand how to create relationship inside
MySQL ?
Foreigh keys may be not the right way to create relationship ?
(so easy under Access and MSSqlServer)
Thanks for help,
Pierre.
plarts Guest
-
Relationship in MS Access
In MS Access, there is an interface to draw the relationsip between tables. Do I really have to draw the relationship to obtain databse data?... -
many to one relationship
How do I set up the tables and relationship such that I can reflect the item desc. of all items in my shopping cart? I am having item1, item2,...,... -
Breaking a relationship
Any help will be appreciated- 1. Originally set up a combo box in a form referencing a look-up table. 2. Redesigned the look-up table and saved... -
Can it have dependences without a relationship among the tables?
Can it have dependences without a relationship among the tables? -
threeway relationship?
Ok, so I have been up since early this morning actually focusing on Filemaker, and the database I have been thinking about building since I got my... -
Dan Bracuk #2
Re: MySQL relationship
It sounds like you designed your database ok (not sure about the delete cascade
part though), but you are inserting your data in the wrong order. You have to
populate your parent table before you can populate your child table.
Dan Bracuk Guest



Reply With Quote

