I have two tables.
TM_Det
Information
the table TM_Det has field
TM_ID
Name
the table Information has following fields.
TM_ID
Detail
TM_Det is main table and information is joined table.
both are linkded with primary key and foreign key
I have single form to contain three fields to add in both tables.
TM_ID
Name
Detail
dal.Table("TMA_Det").Param("Detail")=values("Detail")
dal.Table("TMA_Det").Value("TMA_ID")=values("TMA_ID")
dal.Table("TMA_Det").Update()
values.Remove("TMA_ID")
dal.Table("othertable").Param("fieldname")=values("fieldname")
dal.Table("othertable").Value("joinedfield")=values("joinedfield")
dal.Table("othertable").Update()
values.Remove("joinedfield")
2. Use the following code for details table in Add Page: After record added and/or Edit page: After record updated events.
dal.Table("detailstable").Param("detaillinks")=oldvalues("detaillinks")
dal.Table("detailstable").Value("detailfield")=values("detailfield")
dal.Table("detailstable").Update()
values.Remove("detailfield")
al.Table("TMA_Det").Param("NAme")=oldvalues("NAme")
dal.Table("TMA_Det").Value("TMA_ID")=values("TMA_ID")
dal.Table("TMA_Det").Update()
values.Remove("TMA_ID")
I have used this code for adding information. what is wrong with this code. I need help.
i tried many time but my problem is not resolved yet.