WebEdition: Dictionary .Clear doesn't work?

I have a big problem:

I created a dictionary in the Session Properties with the name “GlobalSessionDict_ArtikelnummerBestellmenge”.

In the Open-EventHandler of my window I used this line:
GlobalSessionDict_ArtikelnummerBestellmenge = New Dictionary

Now, I have the problem, that the .clear - function doesn’t work.

I have a button with the action:


But the Dict isn’t empty.

[ I tried too:
Session.GlobalSessionDict_ArtikelnummerBestellmenge = NIL ]

But the the Dict isn’t empty. The keys and values are still there.

Do I something wrong?

I suspect that you’re using Session improperly. Let’s back up and ask what you are trying to accomplish with this Dictionary object.

Hm, I’m using Session because I use it for the Order Quantity of a Webshop.

ArticleNumber in the key.
The Quantity is the Value.

I have to use Session, because a global dict would be a basket for all users, but every User have his Own basket.

A quick test here shows clear to work.

How do you test that clear does not work ?

[quote=239813:@Thomas Mueller][ I tried too:
Session.GlobalSessionDict_ArtikelnummerBestellmenge = NIL ][/quote]
That would indicate a problem in your code, not in dictionary. Basically, you’re addressing 2 separate objects. If the dictionary survives being set nil, then you aren’t setting the variable you think you are.