|
|
 |
| 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

September 11th, 2006, 01:54 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2006
Location: norcross, Ga, USA.
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

September 11th, 2006, 01:58 PM
|
|
Wrox Author
Points: 12,827, Level: 49 |
|
|
Join Date: Oct 2005
Location: Akron, Ohio, USA.
Posts: 4,029
Thanks: 1
Thanked 42 Times in 42 Posts
|
|
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."
|

September 11th, 2006, 02:15 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2006
Location: norcross, Ga, USA.
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|

September 11th, 2006, 02:31 PM
|
|
Wrox Author
Points: 12,827, Level: 49 |
|
|
Join Date: Oct 2005
Location: Akron, Ohio, USA.
Posts: 4,029
Thanks: 1
Thanked 42 Times in 42 Posts
|
|
"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."
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |