Hiya,
The way i approach the problem is to store the contents of the cart within a single, delimited session variable. This avoids the problem of creating and deleting temporary tables, and orders are only written to a database once completed.
e.g. to add an item to the cart would be something like this:
strOrder = "|" & Request.Form("id"

& "," & Request.Form("quantity"

& "," & strPrice
Session("basket"

= Session("basket"

& strOrder
Where "," separates properties of that item such as price, id etc., and "|" separates each order item from the next.
To retrieve the basket contents from the variable, use the split() function to create arrays of the items
e.g.
basketArray = Split(Session("basket"

,"|"
Then loop through this array, splitting each item into its properties e.g.
For iCount = 1 to uBound(basketArray)
orderArray = Split(basketArray(iCount),","
response.write "item ID:" & orderArray(0)
response.write "item quantity:" & orderArray(1)
response.write "item price:" & orderArray(2)
Next
Although at first glances this may seem relatively complicated with all these arrays, it is actually pretty simple to work with, and certainly beats uses temporary tables.
I hope this helps you head in the right direction, if you require any further information please do not hesitate to ask.
Best wishes,
Nick
Nick (Software Developer)
nick@retrographics.fsnet.co.uk
nick.price@myenable.com