If you need to read data contents easier yet
to use OleDB methods
Attached is edited version I've found on this forum
See how it will works for you
For the testing create the form with DataGridView and add
one Button
Change database path and table name and fields in
connection string
Hth
~'J'~
Imports System.Data
Imports System.Data.OleDb
Imports ADODB
'// Note :
'// Add reference to Microsoft ActiveX Data Objects 2.X Library
'//
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Create a connection string
Dim ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\MyData\MyBlocks.mdb"
' Select fields from table Blocks
Dim sql As String = "SELECT BlockName, TAG1, TAG2, TAG3, TAG4 From Blocks"
' Create a Connection object and open it
Dim conn As Connection = New Connection
Dim connMode As Integer = ConnectModeEnum.adModeUnknown
conn.CursorLocation = CursorLocationEnum.adUseServer
conn.Open(ConnectionString, "", "", connMode)
Dim recAffected As Object = Nothing
Dim cmdType As Integer = CommandTypeEnum.adCmdText
Dim rs As _Recordset = conn.Execute(sql)
' Create dataset and data adpater objects
Dim ds As DataSet = New DataSet("$Recordset$")
Dim da As OleDbDataAdapter = New OleDbDataAdapter
' Call data adapter's Fill method to fill data from ADO
' Recordset to the dataset
da.Fill(ds, rs, "Blocks")
' Now use dataset
DataGridView1.DataSource = ds.Tables(0)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' Get data from selected row(s)
For i As Integer = 0 To DataGridView1.Rows.Count - 1
If DataGridView1.Rows.Item(i).Selected Then
For j As Integer = 0 To DataGridView1.Columns.Count - 1
MsgBox("Row " & i + 1 & ", Column " & j + 1 & " value: " & DataGridView1.Item(j, i).Value.ToString)
Next
End If
Next
Me.Close()
Me.Dispose()
End Sub
End Class