I am using the application object to create a new order id for my shopping cart
This should check to see if they have a shopping cart session, if they have then continue with that session, if not then create a new session with unique id that is generated by the application object.
My problem is that everyone on my demo is coming on the same sessionid, i.e. the application object is not incrementing.
Have I done something wrong?
Code:
Sub CreateNewOrder()
Application.lock
if Application("orderID") = "" then
Application("orderID") = 1
end if
intOrderID = Application("orderID")
Session("orderID") = intOrderID
SQLorder = "INSERT INTO table (orderID, status) values ("&intOrderID&", 'OPEN')"
Objconn.Execute(SQLorder)
Application("orderID") = Application("orderID") + 1
Application.Unlock
End Sub
intOrderID = cstr(Session("orderID"))
if intOrderID = "" then
CreateNewOrder
end if
This should check to see if they have a shopping cart session, if they have then continue with that session, if not then create a new session with unique id that is generated by the application object.
My problem is that everyone on my demo is coming on the same sessionid, i.e. the application object is not incrementing.
Have I done something wrong?