Contents

 
Home
ASPRunner Professional 7.0 manual
Prev Page Next Page
 
 

Update multiple tables

 

To update two joined tables:

1. Use the following code in Add page: Before record added and/or Edit page: Before record updated events.

yellowbulbNote: Change the values listed in red to match your specific needs.

sql = "update othertable set joinedfield=" & values("joinedfield") & " ... "

dbConnection.Execute sql

values.Remove("joinedfield")

To update master and details tables:

1. Use the following code for joined table in Add page: Before record added and/or Edit page: Before record updated events.

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")

For more information about using Data Access Layer (DAL), see Data Access Layer.

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)