zzfive03
Programmer
- Jun 11, 2001
- 267
Hello;
I have an array which is dynamicly populated from the results of a SQL result set. I want to check to see if the array contains records. When I do a:
myArray_ubound = Ubound(myArray)
response.Write myArray_ubound
The Ubound is always 1 less than the total # of records (telling me that VB uses a 0 based array).
This means that if there is 1 record, the ubound = 0. However, my problem is that how can i tell if the array is empty? It appears it is still a result of 0, before I ever assign it. Therefore makeing a empty array, and an array with 1 value have a Ubound of 0.
Am I doing something wrong? Is there an easyer way to determien if there is a value in my array?
Thanks in advance.
I have an array which is dynamicly populated from the results of a SQL result set. I want to check to see if the array contains records. When I do a:
myArray_ubound = Ubound(myArray)
response.Write myArray_ubound
The Ubound is always 1 less than the total # of records (telling me that VB uses a 0 based array).
This means that if there is 1 record, the ubound = 0. However, my problem is that how can i tell if the array is empty? It appears it is still a result of 0, before I ever assign it. Therefore makeing a empty array, and an array with 1 value have a Ubound of 0.
Am I doing something wrong? Is there an easyer way to determien if there is a value in my array?
Thanks in advance.