Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-28-2007, 02:38 AM   PM User | #1
cloudy
New Coder

 
Join Date: May 2007
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
cloudy is an unknown quantity at this point
Question how to delete session cart after insert into DB?

halo there..i have some problem here..i have store the cart into a session array...after that, when user checkout, i need to insert each cart into the database table..

Code:

if localCart( CARTPID, i )<> "" THEN
set rsInsert = Server.CreateObject("ADODB.Recordset")
sqlInsert = "INSERT INTO TBL_ORDERMASTER"
sqlInsert = sqlInsert & " (CustomerMasterID,TotalAmount,DiscountAmount,DiscountPercentage,OrderNumber,OrderPrefix,Remarks,StatusOrder,DateCreated,DateModified,CreatedBy,ModifiedBy)"
sqlInsert = sqlInsert & " VALUES (" & 1 & ", " & newprice & ",'"& ringgit &"', '"& percent &"',"& 1000 &",'aaaa','bbbb','N','"&Now()&"','"&Now()&"','0','0')"
response.Write sqlInsert
objconn.execute sqlInsert	

end if
my problem is...how can i delete the session cart after i insert into db?
i think i cant use the session.abandon..since got the userlogin session id..if i use the session abandon, it will kill all the session..how can i do it? plz help..plz help.....urgent..plz help..thank you very much.

Last edited by cloudy; 11-28-2007 at 02:54 AM..
cloudy is offline   Reply With Quote
Old 11-28-2007, 08:14 AM   PM User | #2
cloudy
New Coder

 
Join Date: May 2007
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
cloudy is an unknown quantity at this point
hi there..i have solved it..thanx all!
cloudy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:45 PM.


Advertisement
Log in to turn off these ads.