Hello experts!
I am getting an "Object Required" error when trying to access an element of a dictionary.
I have a database connection which performs two queries. The first query is saved in a dictionary object as follows:
dim arrOnCall ()
count = 0
while not oRs.EOF
count = count + 1
redim preserve arrOnCall (count)
Set arrOnCall(count) = server.CreateObject("Scripting.Dictionary")
arrOnCall(count).Add "fname", oRs("first_name")
arrOnCall(count).Add "lname", oRs("last_name")
arrOnCall(count).Add "beeper", oRs("fax")
arrOnCall(count).Add "home", oRs("phone")
next
Response.Write arrOnCall (0).item("fname")
...where oRs is the result from the query. The error occurs at the Response.Write line at the bottom and gives the "Object Required" error.
I look forward to your timely responses, as this is time-sensitive.
Thank you in advance!
Taarik.
I am getting an "Object Required" error when trying to access an element of a dictionary.
I have a database connection which performs two queries. The first query is saved in a dictionary object as follows:
dim arrOnCall ()
count = 0
while not oRs.EOF
count = count + 1
redim preserve arrOnCall (count)
Set arrOnCall(count) = server.CreateObject("Scripting.Dictionary")
arrOnCall(count).Add "fname", oRs("first_name")
arrOnCall(count).Add "lname", oRs("last_name")
arrOnCall(count).Add "beeper", oRs("fax")
arrOnCall(count).Add "home", oRs("phone")
next
Response.Write arrOnCall (0).item("fname")
...where oRs is the result from the query. The error occurs at the Response.Write line at the bottom and gives the "Object Required" error.
I look forward to your timely responses, as this is time-sensitive.
Thank you in advance!
Taarik.