using con as new SqlConnection("connection string")
con.open()
using dr as sqldatareader = new sqlcommand("select * from tablename",con).ExecuteReader()
if dr.hasrows then
dim dt as new datatable
dt.load(dr)
GridView.DataSource= dt
else
GridView.DataSource=nothing
end if
end using
end using