P
Peter
I run into this situation all the time and I'm wondering what is the
most efficient way to handle this issue:
I'll be pulling data out of a data source and want to load the data
into an array so that I can preform complicated operations against
this data. The returned record count in these operations is always
variable.
1. I have been using an arraylist.add function to handle
non-multidemional returns but was wondering if I'm better off diming
these returns as a strString() and then redimin with presearve as the
values come in?
Example
Dim StrString() as string
dim i as integer = 0
for data looping....
redim presearve StrString(i + 1)
i +=1
next
the next question would be in the multidemin.
2. If you have a sql statement that returns multi demensional
information what is the best way to normally handle these situations.
When you do not know the record count.
Example:
sql = select Value1, Value2Subset, Value3Subset
Dim sqlHold(1, 3)
If this was more than 1000 rows.... what type of variable scope should
I use.
sqlHold(0,0) = Value1
sqlHold(0,1) = Value2Subset
sqlHold(0,1) = Value3Subset
most efficient way to handle this issue:
I'll be pulling data out of a data source and want to load the data
into an array so that I can preform complicated operations against
this data. The returned record count in these operations is always
variable.
1. I have been using an arraylist.add function to handle
non-multidemional returns but was wondering if I'm better off diming
these returns as a strString() and then redimin with presearve as the
values come in?
Example
Dim StrString() as string
dim i as integer = 0
for data looping....
redim presearve StrString(i + 1)
i +=1
next
the next question would be in the multidemin.
2. If you have a sql statement that returns multi demensional
information what is the best way to normally handle these situations.
When you do not know the record count.
Example:
sql = select Value1, Value2Subset, Value3Subset
Dim sqlHold(1, 3)
If this was more than 1000 rows.... what type of variable scope should
I use.
sqlHold(0,0) = Value1
sqlHold(0,1) = Value2Subset
sqlHold(0,1) = Value3Subset