ASP CompareMode Attribute

Definition and Usage

The CompareMode property sets or returns the comparison mode of the keys in the Dictionary object.

Syntax:

DictionaryObject.CompareMode[=compare]
Parameter Description
compare

Optional. Specifies the comparison mode.

The following values can be used:

  • 0 = vbBinaryCompare - Binary Comparison
  • 1 = vbTextCompare - Text Comparison
  • 2 = vbDatabaseCompare - Database Comparison

instance

<%
dim d
set d=Server.CreateObject("Scripting.Dictionary")
d.CompareMode=1
d.Add "c","China"
d.Add "i","Italy"
The 'add' method below will fail
The add method below will fail because the letter 'I' already exists
%>