By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,626 Members | 2,202 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,626 IT Pros & Developers. It's quick & easy.

Clear Shopping Cart tbl

P: n/a
USing ASP, MSSql on W2k3
I am worried of accumulated old cart product selections from expired browser
windows or other unforseen events.
I am holding selected productID's & quantities & userID & sessionID in a
sql table from a shopping cart.
I allow user to clear their cart from a button and also automatically clear
their cart on user logon.
Also on checkout I clear their cart.
I am storing selections with sessionID & UserID so they will be unique,.
But does anyone reccomend any other cart selection maintenance procedure i
could use,.

Regards
Don
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You could store the last activity time for each session in the table and
then schedule a job to run that executes something like:

DELETE FROM yourTable WHERE DATEDIFF (mi, LastActivity ,GETDATE()) > 20

Replace 20 with the your session timeout value. (Going higher than your
session timeout would be better. I'd probably use 60 and schedule it to run
every hour or something.)

Ray at work
"Don Grover" <dg*****@assoft.com.au> wrote in message
news:OL**************@TK2MSFTNGP10.phx.gbl...
USing ASP, MSSql on W2k3
I am worried of accumulated old cart product selections from expired browser windows or other unforseen events.
I am holding selected productID's & quantities & userID & sessionID in a
sql table from a shopping cart.
I allow user to clear their cart from a button and also automatically clear their cart on user logon.
Also on checkout I clear their cart.
I am storing selections with sessionID & UserID so they will be unique,.
But does anyone reccomend any other cart selection maintenance procedure i could use,.

Regards
Don

Jul 22 '05 #2

P: n/a
"Don Grover" wrote in message news:OL**************@TK2MSFTNGP10.phx.gbl...
: USing ASP, MSSql on W2k3
: I am worried of accumulated old cart product selections from expired
browser
: windows or other unforseen events.
:
: I am holding selected productID's & quantities & userID & sessionID in a
: sql table from a shopping cart.
: I allow user to clear their cart from a button and also automatically
clear
: their cart on user logon.
: Also on checkout I clear their cart.
: I am storing selections with sessionID & UserID so they will be unique,.
: But does anyone reccomend any other cart selection maintenance procedure
i
: could use,.

I keep track of date and time when the shopping experience began and remove
old carts older than 24 hours. One of the sites is quite busy and daily
maintenance takes care of all issues.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #3

P: n/a
Hello Don,

Did Ray and Roland answered your question? If you need more informaiton
about this issue, please feel free to let me know.

Luke

Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.