Home » Developer & Programmer » Forms » master detail relation problem
icon1.gif  master detail relation problem [message #223473] Fri, 09 March 2007 01:17 Go to next message
fmis
Messages: 11
Registered: October 2005
Location: CALICUT
Junior Member
sir,
i have create a master detail relation with same table. detail block have multiple records. while iam inserting an error occured.(ie can not insert null)
table structure
officecode char(7) not null,
monthyear number(6) not null
bgh1 number(3) not null
bgh2 number(2) not null
in master block only two fields ie officecode and monthyear(databse field)
relation is
masterblock.officecode=detail.officecode
and master.monthyear=detail.monthyear
Re: master detail relation problem [message #223487 is a reply to message #223473] Fri, 09 March 2007 03:02 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Although you want to DISPLAY only two items (columns) in master block, you must include all NOT NULL columns into that block. Don't display them if you don't need to see them. But you will still need to populate those items before inserting records into the database, or you'll end up with the error - the one you already saw. Will you do it in a form or, perhaps, a database trigger, doesn't matter. Just make sure it is done.
Re: master detail relation problem [message #225421 is a reply to message #223487] Mon, 19 March 2007 22:37 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Re: master detail relation problem [message #227912 is a reply to message #225421] Fri, 30 March 2007 03:03 Go to previous message
fmis
Messages: 11
Registered: October 2005
Location: CALICUT
Junior Member
yes sir i have solved the problem.
by setting the master datablock property
Advanced Database ->
DML Data target type = none
Previous Topic: problem with sequence generation
Next Topic: An image on a form
Goto Forum:
  


Current Time: Mon Mar 10 05:29:37 CDT 2025