Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

ISessionObject::put_Value

The ISessionObject::put_Value method stores a variant in the Session object. If the variant is a COM object, then Sun Chili!Soft ASP will attempt to store the default value of that object into the application. If Sun Chili!Soft ASP cannot get the default value, then the call will fail.

HRESULT put_Value(

BSTR bstrValue,

VARIANT var

);

Parameters: ISessionObject::put_Value

bstrValue

A binary string that contains the variable name.

var

A variant that contains the variable value.

Remarks: ISessionObject::put_Value

If you store an array in a Session object, you should not attempt to alter the elements of the stored array directly. For example, the following script will not work.

<% Session("StoredArray")(3) = "new value" %>

This is because the Session object is implemented as a collection. The array element StoredArray(3) does not receive the new value. Instead, the value is indexed into the collection, overwriting any information stored at that location.

It is strongly recommended that if you store an array in the Session object, you retrieve a copy of the array before retrieving or changing any of the elements of the array. When you are done with the array, you should store the array in the Session object again so that any changes you made are saved.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.