Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 11th, 2006, 12:54 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
Default intermediate storage

hi all

i am displaying some add to cart information in a datagrid, how can i store those values into a temporary table, so that, if the user deletes a particular order he just selected, the information get deleted from the temporary table, not from the databse?

thanks in advance

 
Old September 11th, 2006, 12:58 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Use the temp table as your cart (as opposed to storing the information in session), each cart has an id, then, if a user removes an item, DELETE from tmpTable where cartID = [value]

"The one language all programmers understand is profanity."
 
Old September 11th, 2006, 01:15 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi

thanks for your reply
what is your opinion? to use a temporary table or to store information in session?
which one is the best approach?



 
Old September 11th, 2006, 01:31 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

"Best" is a subjective term because it all depends on your needs/wants. Storing information in Session will be slightly faster because there is not the overhead in opening a database connection, retrieving data, displaying it, etc.

Using session though, if a users session times out, they will lose their entire "Shopping Cart" and have to start over where as a database shopping cart can be persisted over multiple Sessions. Which you choose to do will depend, as I said, on your needs and wants.

"The one language all programmers understand is profanity."





Similar Threads
Thread Thread Starter Forum Replies Last Post
beginning to intermediate to professional. shegxzyl PHP FAQs 1 May 14th, 2009 10:49 AM
How to sum nodes with some intermediate process r2u_2 XSLT 3 January 7th, 2008 01:41 AM
I HAVE A QUESTION ABOUT INTERMEDIATE TABLES Teqlump Access 2 September 7th, 2004 06:02 PM
Intermediate to advanced ASP 3.0 Book conundrum Classic ASP Professional 3 October 12th, 2003 12:35 PM
Beginner, intermediate or Pro? psychadelic Beginning VB 6 5 June 17th, 2003 12:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.