I am using MySql.
 
OK. I have a Parent-Child relationship which is 1:1 relationship. I am inserting into 
each table at the same time. Obviously, the Parent gets inserted first. But the 
Primary Key is auto-generated by MySQL in an auto-generated field. So when the child 
record gets inserted, I need that newly created ID to be in the child record. But it 
isn't getting it, and the ID in the child is Null, so the Database returns an error 
for it being Null.
 
Does anyone know a way to fix this problem? Putting the child fields into the Parent 
table is not a possibility and wouldn't be a good db design decision.
 
Thanks everyone
 
Mark

                
---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 

Reply via email to