New key within session

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tdonohue
    New Member
    • Mar 2009
    • 2

    New key within session

    I am working on an e-commerce application where product is being delivered on a periodic or subscription basis. I have used an application variable as a foreign key to tie products together that are contained in a single order. However, the user may want to make a second (or third) purchase delivered on a different schedule, which requires a separate order (separate billing) —without starting a new session and having to re-login.
    So…What di use as a second key?
    I am thinking of taking the identity of the last product ordered and using that for the next set of products but I am not sure how to implement that. Nor am I confident that that is the best solution.
    Any ideas?
    BTW: I am picking up the slack for a fired programmer and am working well outside my skill set. So please dumb-down your musings.
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Sorry it took me a while to visit the forum. Donohue, I would definitely move away from application variables for this type of thing. It seems to me that this needs to be handled in a database. Does that help?

    Jared

    Comment

    • tdonohue
      New Member
      • Mar 2009
      • 2

      #3
      I ended up by creating a separate table that incremented both on Login and check out and used that identity for my foreign key. That way they could check out without logging out and be redirected to the beginning of the product selection process.
      Thanks for your insight.

      Comment

      Working...