04/05/2008 Development / asp.net

Imports System.Data

Dim con As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Password=;Data Source=" & Server.MapPath("dados.mdb"))
Dim cmd As New OleDb.OleDbCommand("SELECT nome FROM TABELA", con)
Dim dr As OleDb.OleDbDataReader

con.Open()
dr = cmd.ExecuteReader

While dr.Read
Response.Write(dr.GetString(0) & "")
End While

con.Close()
con = Nothing
cmd = Nothing
dr = Nothing