this is an answer I received from [another question](https://stackoverflow.com/q/17115877/1630171). I was just wondering how I use an SQL Query in asp to add users to the scripting dictionary using a database instead of writing them manually.

```
Set bannedUsers = CreateObject("Scripting.Dictionary")
    bannedUsers.Add "johnsmith", True
    bannedUsers.Add "cmanson", True
    ...

    For Each opt In document.getElementById("frmNew").options
      If opt.selected And bannedUser.Exists(opt.text) Then
        MsgBox "This user is banned."
      End If
    Next

```