This is the closest equivalent in VB.Net:-
vbnet Code:
'
Dim conn As New SqlConnection("Data Source=intel32;Integrated Security=True;Initial Catalog=DbSimple")
Dim cmd As New SqlCommand("Select * From Tbl1", conn)
conn.Open()
Dim reader As SqlDataReader = cmd.ExecuteReader
Do While reader.Read
'Shows the value of the first column
MsgBox(reader.GetInt32(0))
Loop
There are no RecordSets in VB.Net so we can't write back to the database that way. Much has changed. You should really study the link RhinoBull posted.