Hey guys,
I have a recordset that I pull back from a database. I'd like to put this recordset into an array. Seems simple enough, right?
I keep getting the error that cust is not an object or doesn't exist which makes no sense since I have it declared var cust = new Array().
For some reason when I try to assign cust a value using the rst.fields(), it doesn't work.
To test, I put:
and it worked fine.
Can anyone see what I am doing wrong?
Thanks for your help!
I have a recordset that I pull back from a database. I'd like to put this recordset into an array. Seems simple enough, right?
Code:
var cust = new Array()
var i=0
while (!rst.eof)
{
cust[i] =rst.fields("custName")
rst.movenext
i++
}
I keep getting the error that cust is not an object or doesn't exist which makes no sense since I have it declared var cust = new Array().
For some reason when I try to assign cust a value using the rst.fields(), it doesn't work.
To test, I put:
Code:
cust[0]="TEST"
Can anyone see what I am doing wrong?
Thanks for your help!