SessionClass.Variable problems

Apr 03, 2008 2 Replies

As I understand it, this array of 10 is an array of objects, and it is used to store objects between custom dll's. Anyways I have written one, and what I put in to the array doesnt seems to stay there. (I am developing in VB6, NOT vb.net)


****Code****

Public Function Process(Session As QSRules.SessionClass) As Boolean



Dim cartList As CartArray 'Custom object Dim X As Integer



X = SessionClass.Variable(0)



MsgBox("Variable(0): " & X)



cartList = SessionClass.Variable(1)



if(cartList = Null) then set cartList = new CartArray cartList.init end if



'A bunch of code in the middle



If (cartFound) then SessionClass.Variable(0) = 1 end if



SessionClass.Variable(1) = cartList



End Function


***End of Code***

So, what im assuming should happen, is that the first time I run this, there should not be anything in SessionClass.Variable(0) or SessionClass.Variable(1). But once this finished once, those 2 array indexes should be filled with what I set them to at the bottom of the code, but they dont seem to be. Am I setting/getting values from this Variable array wrong, or could something else be the matter?


First of all, you should use Session.Variable(0). secondly, this procedure returns an object instead of an integer. Thirdly, whatever you trying to do is out of my understanding.

Follow my observati> As I understand it, this array of 10 is an array of objects, and it is

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required