M
mccreelake author
Hi, I have some code for the After Record Deleted event. The code executes fine so long as only one record is deleted, but if multiple records are deleted it snags and throws an 500 error. Here is the code:
Dim ApplicationID, App_Module, DB_Table, DB_Table_RowID, DB_Table_RowID_Action
ApplicationID = 4
App_Module = "User Budget Planner"
DB_Table = "BudgetLines"
DB_Table_RowID = keys("BudgetLineID")
DB_Table_RowID_Action = "Delete Record"
DB_Table_RowID_Description = NULL SQL_AppEventLog = "USE UNI_Database_PROD "
SQL_AppEventLog = SQL_AppEventLog & "INSERT INTO UTIL_ApplicationEventsLog "
SQL_AppEventLog = SQL_AppEventLog & "(APP_Applications_ApplicationID, APP_Module, DB_Table, DB_Table_RowID, DB_Table_RowID_Action, "
SQL_AppEventLog = SQL_AppEventLog & "DB_Table_RowID_Description, USR_Clients_ClientID, USR_URL, "
SQL_AppEventLog = SQL_AppEventLog & "USR_IP, USR_Machine_Name, USR_Browser, SRV_SSL_Enabled, SRV_SSL_Keys) "
SQL_AppEventLog = SQL_AppEventLog & "VALUES (" & ApplicationID & ",'" & App_Module & "','" & DB_Table & "'," & DB_Table_RowID & ",'" & DB_Table_RowID_Action & "','"
SQL_AppEventLog = SQL_AppEventLog & DB_Table_RowID_Description & "', " & Session("ClientID") & ",'" & Request.ServerVariables("URL") & "','"
SQL_AppEventLog = SQL_AppEventLog & Request.ServerVariables("remote_addr") & "','" & Request.ServerVariables("remote_host")
SQL_AppEventLog = SQL_AppEventLog & "','" & Request.ServerVariables("http_user_agent") & "','" & Request.ServerVariables("HTTPS") & "','" & Request.ServerVariables("CERT_KEYSIZE") & "')"
dbConnection.Execute SQL_AppEventLog Any help would be appreciated.
|
|