Hi,
I am using the following script in the Before Add section of a page, and it works perfectly as it adds the data into a tracking table.
The problem is that I need to create numerous copies of this page, I have created another copy of this page by using "Create Custom View" and then I rename this new page to something else, when I try to Edit a record with this new page I get an ASPRunner Error in the browser telling me that an Object is required, if I remove this script from the page then the Edit works OK but doesn't insert the data into the tracking table, the original page still works OK, could this be a bug?
set rsFields = dal.Table(strTableName).Query(where,"")
if not rsFields.eof then
dal.Table("PMT_PATCH_TRACKING").[ID]=rsFields("ID")
dal.Table("PMT_PATCH_TRACKING").[PMT_USER_ID]=rsFields("PMT_USER_ID")
dal.Table("PMT_PATCH_TRACKING").[ENVIRONMENT]=rsFields("ENVIRONMENT")
dal.Table("PMT_PATCH_TRACKING").[MSPATCH]=rsFields("MSPATCH")
dal.Table("PMT_PATCH_TRACKING").[MS_KB_REF]=rsFields("MS_KB_REF")
dal.Table("PMT_PATCH_TRACKING").[STATUS]=rsFields("STATUS")
dal.Table("PMT_PATCH_TRACKING").[SEVERITY]=rsFields("SEVERITY")
dal.Table("PMT_PATCH_TRACKING").[ADDED_BY]=Session("full_name")
dal.Table("PMT_PATCH_TRACKING").[DATE_TIME_ADDED]=rsFields("DATE_TIME_ADDED")
dal.Table("PMT_PATCH_TRACKING").[LAST_UPDATE]=rsFields("LAST_UPDATE")
dal.Table("PMT_PATCH_TRACKING").[CURRENT_DATE_TIME]=rsFields("CURRENT_DATE_TIME")
dal.Table("PMT_PATCH_TRACKING").Add()
end if
rsFields.close: set rsFields=nothing
BeforeEdit = True