How to fill one dimensional array from SQL database field
Hi all
I have a table which has numbers field,
and I
declared array (xarray) like
dim xarray as integer()
i get the resultset of my query by this query
Dim SqlCon as new SqlConnection("Data Source=LAPTOP\ALP;User id=Sa;Password=password;Initial Catalog=loto")
Dim SqlCmd as new SqlCommand("Select top 10 no from numbers order by date DESC",SqlCon)
Dim SqlRdr as SqlDataReader
SqlCon.Open()
SqlRdr= SqlCmd.ExecuteReader()
Now I want to fill my array with the result of this query
Is there a way do it with out loop, If no How can I do it with loop
:D
Thank in advance.