ASP VBScript Details :: ate SESSION variable using UPDATE TRANSACTION?

This thread was displayed: 546 times


Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.

For more information about the affected products visit: www.interaktonline.com/Support/

View Threaded Show descending
FrederickRM
11-03-2006 21:43:22 GMT +2

I am triyng to update a SESSION variable without writing it to a db or creating a field for it in the db, while adding an entry using UPDATE TRANSACTION. Here is bad attempt at updating the SESSION VAR:

<%
' Make an update transaction instance
Dim upd_user_cc: Set upd_user_cc = new tNG_update
upd_user_cc.init MM_dms_STRING
tNGs.addTransaction upd_user_cc
' Register triggers
upd_user_cc.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1")
upd_user_cc.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation)
' Add columns
upd_user_cc.setTable "user_cc"
upd_user_cc.addColumn "monthly_service", "STRING_TYPE", "POST", "monthly_service"
upd_user_cc.setPrimaryKey "id_user", "NUMERIC_TYPE", "GET", "id"
SESSION("click")=1
%>

That only results in click ALWAYS equal to 1.

I tried a CUSTOM TRANSACTION but I may not know how to set that up properly because it did not work either. Here is what I tried:

<%
' Make an insert transaction instance
Dim customTransaction: Set customTransaction = new tNG_custom
customTransaction.init MM_dms_STRING
tNGs.addTransaction customTransaction
' Register triggers
customTransaction.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1")
' Add columns
customTransaction.addColumn "click", "STRING_TYPE", "SESSION", "click", "1"
' End of custom transaction instance
%>

That seemed to nothing at all. I did remove the SESSION("click")=1 from the UPDATE transaction first. I was hoping that the CUSTOM TRANSACTION would trigger off the same SUBMIT button as the UPDATE but that isn't working. I have the CUSTOM T placed before the UPDATE T in the code as of now. Like this:

<%
' Make an insert transaction instance
Dim customTransaction: Set customTransaction = new tNG_custom
customTransaction.init MM_dms_STRING
tNGs.addTransaction customTransaction
' Register triggers
customTransaction.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1")
' Add columns
customTransaction.addColumn "click", "

View full message
Back | Reply | Quote | Top
FrederickRM
11-03-2006 21:49:03 GMT +2

HA!!

I changed it to a CUSTOM TRIGGER instead of CUSTOM TRANSACTION and it WORKS!!!

Woohoo!

So it looks like this now (in case it can help anyone else):

<%
' Make an update transaction instance
Dim upd_user_cc: Set upd_user_cc = new tNG_update
upd_user_cc.init MM_dms_STRING
tNGs.addTransaction upd_user_cc
' Register triggers
upd_user_cc.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1")
upd_user_cc.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation)
upd_user_cc.registerTrigger Array("AFTER", "Trigger_Custom", 50)
' Add columns
upd_user_cc.setTable "user_cc"
upd_user_cc.addColumn "monthly_service", "STRING_TYPE", "POST", "monthly_service"
upd_user_cc.setPrimaryKey "id_user", "NUMERIC_TYPE", "GET", "id"
%>
<%
'start Trigger_Custom trigger
Function Trigger_Custom (ByRef tNG)
Session("click")=1
Set Trigger_Custom = nothing
End Function
'end Trigger_Custom trigger
%>

Reply | Quote | Top
Sign In
Sign In to see your information.
© Adobe Systems Romania. All rights reserved.