Hi
I usually do C# but have inherited a classic ASP project.
I have defined a class:
Class clsPayment
Public Name
End Class
Set objPayment = New clsPayment
objPayment.Name = "StackOverflow payment"
And a dictionary:
Set colPayments = CreateObject("Scripting.Dictionary")
colPayments.Add 1, objPayment
When reading the objects later on I cannot call the public field:
For i = 0 to colPayments.Count - 1
objPayment = colPayments.Item(i)
Response.Write(objPayment.Name)
Next
This throws an error on the Response.Write line:
Microsoft VBScript runtime error '800a01a8'
Object required: ''
What did I do wrong?