Imports System.Data.OleDb
Module Module1
Sub Main()
Dim Cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\mibase.mdb;Persist Security Info=False")
Cn.Open()
Dim comando As OleDbCommand
comando = New OleDbCommand()
comando.CommandText = String.Format("SELECT Telefono FROM empleados ")
comando.Connection = Cn
Dim lector As OleDbDataReader
lector = comando.ExecuteReader
Do While lector.Read
Console.WriteLine(lector("Telefono"))
Loop
Dim nombres As New ArrayList
While lector.Read
nombres.Add(lector("Telefono"))
Console.WriteLine(nombres.ToString)
End While
For Each datos As String In nombres
Console.WriteLine(datos)
Next
End Sub
End Module
I have this..but is not working I cant save data in the array and the array is not printing is like empty