BUG: Assignment of Multi-Valued Objects in Request Object Causes Corruption in Scripting Dictionary (216825)
The information in this article applies to:
- Microsoft Active Server Pages
- Microsoft Visual Basic, Scripting Edition 3.0
- Microsoft Visual Basic, Scripting Edition 4.0
- the operating system: Microsoft Windows 98
- the operating system: Microsoft Windows 95
- the operating system: Microsoft Windows NT 4.0
This article was previously published under Q216825 SYMPTOMS
If items in the Request.Form or Request.QueryString collections that contain multiple values are assigned to a Scripting Dictionary object stored in the Session object, data corruption may occur. Corrupted data will manifest either as empty fields (that is, blank individual dictionary items) or items that contain garbage text.
A common example of this is a checkbox; checkbox controls can have the same name so that multiple values of a single named item can be returned to the server.
CAUSE
When the assignment of a multi-valued item in the Request.QueryString or Request.Form collections to an item in the Scripting Dictionary object takes place without explicitly using the Item property of the object within the collection, a reference to the actual object is stored in the Scripting Dictionary instead of the intended value. This means that when the item stored in the Scripting Dictionary is referenced again, the Scripting Dictionary will refrence an object in the Request.QueryString or Request.Form collections instead of the intended string or integer values.
RESOLUTION
As described in the following article in the Microsoft Knowledge Base, the best workaround is to be sure that the Item property is used whenever the Request item is assigned to a Session-cached Scripting Dictionary object:
216279 BUG: VBScript Can Corrupt Data Stored in Scripting Dictionary Object
The Item property will then return a semi-colon delimited string of text values. However, there is a twist when it comes to using these strings on the client. The most efficient technique uses the VBScript Split() function to move the strings into array elements. See the code in the More Information section below for details.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. REFERENCESQ156223 BUG: VBScript can corrupt data stored in Scripting Dictionary Object
Modification Type: | Major | Last Reviewed: | 11/26/2003 |
---|
Keywords: | kbbug kbpending KB216825 kbAudDeveloper |
---|
|