This topic is locked

Tracking Changes

2/2/2011 1:54:59 AM
ASPRunnerPro General questions
G
guroos author

I asked about this over 2 years ago and found the answer that was successful at the time here:

http://www.asprunner.com/forums/topic/10449-tracking-table/
I have had to rebuild the project and have used the code from that post (and pasted below) but now getting error:

Microsoft VBScript runtime error '800a01a8'

Object required: 'dal.t_Tracking'

/2011_admin3/t_Exhibitors_edit.asp,

-------------

FYI table t_Tracking does exist.

-------------

'edit page' 'before record updated'
Dim dkeys

message =""

dkeys = dict.keys

For n = 0 To dict.Count-1

if dict(dkeys(n))<>oldvalues(dkeys(n)) then

message = message & dkeys(n) & " is changed. Old value: " & oldvalues(dkeys(n)) & ", new value: " & dict(dkeys(n)) & "
"

end if

Next

Response.write message

BeforeEdit=true

------------

'edit page' 'after record updated'
dal.t_Tracking.UserID=SESSION("UserID")

dal.t_Tracking.CompanyID=dict("CompanyID")

dal.t_Tracking.TrackingInfo=message

dal.t_Tracking.DateChangeMade=now()

dal.t_Tracking.Add()

-------------
If I take out 'BeforeEdit=true ' the error goes away & the change is made but the entry is not made in the tracking table.
I'm guessing it might be something to do with the fact that I'm using ASPR 6.2 now.

Any suggestions?

Sergey Kornilov admin 2/3/2011

guroos,
make sure you add t_Tracking table to your project. DAL is only generated for project tables.

G
guroos author 2/5/2011



guroos,
make sure you add t_Tracking table to your project. DAL is only generated for project tables.


As stated above table t_Tracking does exist.

Sergey Kornilov admin 2/7/2011

guroos,
please read my message again. There is no doubt that table exists. It needs to be added to the project.