This topic is locked

Custom Code - Error 450

6/9/2007 12:07:11 AM
ASPRunnerPro General questions
Lowkeck authorDevClub member

I am trying to track who edits a record and when they edit a record. I have created the following colums in my MS SQL DB:
umod - (need to insert the USER ID of the person modifing this record)

dmod - (need to insert the date and time the edit was performed)

uins - (need to insert USER ID of the person adding this record)

dins - need to insert the Date and time the record was added)
I have added the following code to my add page - Before Add:

[codebox]Function BeforeAdd

dict("dins") = Now()

dict("uins") = Session("UserID")

BeforeAdd = True

End Function[/codebox]
I also added the following code to my edit page - Before Edit:

[codebox]Function BeforeEdit(dict, where)

dict("dmod") = Now()

dict("umod") = Session("UserID")

BeforeEdit = True

End Function

[/codebox]
All of these DB fields are in my SQL Select statement. I am running ASP runner 5.0 build 261.

When I try to add a record I get ASP Error 450.

When I edit a record everything works fine.

  • Any ideas?

Lowkeck authorDevClub member 6/9/2007

I solved this using the following code, thanks anyway.

[codebox]Function BeforeAdd(dict)

dict("dins") = Now()

dict("uins") = Session("UserID")

BeforeAdd = True

End Function[/codebox]