natethenotsogreat
New member
- Joined
- Apr 14, 2007
- Messages
- 2
- Programming Experience
- Beginner
VB.NET:
Dim cmd As OleDb.OleDbCommand
Dim dr As OleDb.OleDbDataReader
Dim i As Integer = 0
Dim TestArray As ArrayList = New ArrayList
ConDatabase.Open()
cmd = New OleDb.OleDbCommand("SELECT fldValues FROM tblTest", ConDatabase)
dr = cmd.ExecuteReader
While dr.Read()
TestArray.Add(dr.ToString)
End While
dr.Close()
ConDatabase.Close()
i = 0
For i = i To ("fldValues".Length - 1)
Me.lstTest.Items.Add(TestArray(i))
Next i
System.Data.Oledb.OledbDataReader
this result is loaded into the arraylist and then into the listbox for as many items as I have in the database field fldValues.
I want the actual value to enter into the arraylist and into the listbox.
Any help?
thanks
Last edited by a moderator: