Dim cn As New OleDb.OleDbConnection()
cn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Password=;Initial Catalog=MyDataBase;Data Source=188.18.18.168"
cn.Open()
Dim strSql As String, i As Integer, j As Integer
strSql = "Select * From tTable "
Dim rs As OleDb.OleDbDataReader
Dim cmd As New OleDb.OleDbCommand(strSql, cn)
rs = cmd.ExecuteReader
While rs.Read() = True
If IsDBNull(rs("FieldName")) Then
txtName.Text = ""
Else
txtName.Text = rs("FieldName")
End If
...
End While