Hello Guru's,
I need to fill an array with whole column from database table, so i have used reader to read the values from that column, but can not figure out how to put them into aray (code below doesn't work)
If i put those values into list box then everything runs okCode:Dim aObject As Object Dim i As Integer=0 Dim cmd As New SqlServerCe.SqlCeCommand(aQuery, aConnection) Dim aReader As SqlServerCe.SqlCeDataReader While aReader.Read() aObject(i) = aReader("ID") ' ID is column name i += 1 End While
Please help me with that.Code:While aReader.Read() ListBox1.Items.Add(aReader("ID")) ' ID is column name End While
Tank you in advance.


Reply With Quote

