This one keeps coming back to hit me in the face over again.
' This is the only way I could get this to work. Although, I will not
know what the values in that split statement are. More importantly the
string in the split statement could be null.
Dim strVal : strVal = "one,two,three"
Dim arrOne
arrOne = split(strVal,",")
Ubound(arrOne) ' returns 2
Response.Write arrOne(1) ' prints two
Dim arrOne()
arrOne = split(strVal,",") <---- Type mismatch
Dim arrOne()
arrOne() = split(strVal,",") <------ Subscript out of range
' Here's another one.
Dim arrOne()
Response.Write Ubound(arrOne) <---- subscript out of range
Dim arrOne()
arrOne = Array() <----- Type mismatch
Dim arrOne()
arrOne() = Array() <-------- Subscript out of range
Dim arrOne
arrOne = Array()
Response.Write Ubound(arrOne) <---- Returns -1
' So why is it that the Only way that works, is the way that i've always
been told not to do it.
And I still have yet to find a function that can properly see if an
array is empty.
Ie: if an array is populated from a recordset using GetRows, and no rows
are returned.
isArray = true
isEmpty = false
varType = 8204
typeName = variant()
Ubound <--- Out of range.
I have no way of knowing if the array is populated or not. I have to
use a For loop on the record set to see if it's populated.. There has to
be a better way.