Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a master detail table

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
I have two tables which i connected by a master detail.I have a common field which link these two tables(ID) which is not autoincremented.I have the details of the master table in a DBEDIT and the details of the details table in a DBGRID.When i run the programme it shows me the first value in both the tables,(So my master detial is right)but when i insert values into these tables inserted of getting inserted it is overwritting the existing values.Also the ID is not writtin into the tables.Can someone help me out?

Warm Regards
Anna.
 
hi,

You need to append a record to the detail database:
Detail_table.append;
The Id will automatically be put in the detail table.
When you append a record to the master table the dbgrid with detail information will be empty.

Steph [Bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top