Hi CJM,
For Vbscript, it is dynamic script which use late binding, and the type of
the objects used in script are validated at runtime. For your scenario, is
the rsNetStock an ADO.RecordSet? If so, the RecordSet.fields(key) return
a ADO field object, not directly the value. While we simply assign it to a
variable like
dim id = rsRecords.Fields("id")
that's ok. However, if we directly pass it to the dictionary object's Add
method or key/value accessor, the runtime engine will fail to parse the
object. If you do not want to use additional temp variable, you need to
explicitly use the "Value" property to access the data value of each field
in record row. e.g:
=========================
while not myRS.EOF
Response.Write("<br/>CategoryName: " & myRS("CategoryName"))
list(myRS.Fields("CategoryID").Value) = myRS.Fields("CategoryName").Value &
" value"
myRS.MoveNext()
wEnd
========================
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)