G
Guest
Hi All
I'm doing a 'select * from table' in my DataReader below and populating an
array with the results. Obvisouly I'm only getting the first field from the
results by the use of the GetString(0).
My Question is how do I find out how many elements there are to GetString
without having to know how many fields are in the table?
Thanks
-- Code
Dim List As New ArrayList()
Dim ListCount As Integer = 0
Dim ListReader As SqlDataReader = ListCmd.ExecuteReader()
While ListReader.Read()
List.Insert(ListCount, ListReader.GetString(0))
ListCount = ListCount + 1
End While
--
I'm doing a 'select * from table' in my DataReader below and populating an
array with the results. Obvisouly I'm only getting the first field from the
results by the use of the GetString(0).
My Question is how do I find out how many elements there are to GetString
without having to know how many fields are in the table?
Thanks
-- Code
Dim List As New ArrayList()
Dim ListCount As Integer = 0
Dim ListReader As SqlDataReader = ListCmd.ExecuteReader()
While ListReader.Read()
List.Insert(ListCount, ListReader.GetString(0))
ListCount = ListCount + 1
End While
--