Hi, Happy '05!,

I am trying to remove all but a few selected Session variables from 
the Session.Contents collection. The code seems to remove a few of 
the session variables but not all that want removed. And it seems to 
remove some that I do not want removed. What am I doing wrong in 
this code?

Code:

'Cancel the Order **************

Dim SQLDelOrd,OrdID, Item, x
OrdID = Session("ORDID")
SQLDelOrd = "DELETE tblOrders_temp.* FROM tblOrders_temp WHERE 
(((tblOrders_temp.OrderID)=" & OrdID & "));"

objConn.Execute(SQLDelOrd)

'Release Session Variables******************

For Each Item in Session.Contents
        If Item <> "Start" And Item <> "VisitorID" And Item 
<> "LocationID" And Item <> "NatCoID" And Item <> "DealerID" Then
                Session.Contents.Remove(item)
        End If
Next

For Each x in Session.Contents
        Response.Write(x & " = " & Session.Contents(x) & "<BR />") 
Next

Your assistance would be greatly appreciated. Thanks.


Alan 






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to