ASP Session with VB 6 problem
Posted on 2004-11-15
On a WinNT 4 platform (using Visual Basic 6 and ADO) we had used
Session("VW") = r!VW_NF
Now we are using Windows 2000.
That code, shown above, now raises "No default property for object."
If I paste the statement into the debug window though, it runs without error.
If I modify it to be
Session("VW") = CStr(r!VW_NF)
it runs properly.
OK. So I found a work-around.
But now, I have a worse problem.
We have a class that is just a set of properties (let’s call it clsXXX):
Public Value1 As String
Public Value2 As String
. . .
Public Val__n As String
In (for example) ThePage_Respond(), we have
Dim ob As clsXXX
Set ob = New clsXXX
GetValues ob ' This fills the properties. This Sub is not part of the class, it only fills in the object’s properties
Set Session("XXX") = ob ' <——<<<
Set Session("XXX") = Nothing
At the line marked by the arrow, nothing happens.
The Watch window shows that Session("XXX") is still Variant/Empty.
I need to be able to store objects in the Session.
Is there some flaw in the Windows 2000 environment that cripples Internet Information Server’s ASP objects (Server, Application, Request, Response & Session)?
Are there other issues I am going to run into?