This topic is locked
[SOLVED]

 add entry using single form

3/5/2011 3:53:40 AM
ASPRunnerPro General questions
A
adnankmk author

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.

Sergey Kornilov admin 3/5/2011

Other than misspelled dal object name

al.Table("TMA_Det").Param("NAme")=oldvalues("Name")


Hard to tell what else might be wrong. If you need help from support team post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.