Dim con As OleDbConnection
con = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.4.0;Data Source=C:\db1.mdb;Persist Security Info=False")
Dim Sql As String = "select test1 from Table1"
Dim DA As New OleDbDataAdapter(Sql, con)
Dim DS As New DataTable
DA.Fill(DS)
If DS.Rows.Count > 0 Then
MsgBox("jj")
MsgBox(DS.Rows(0).Item("test1"))
End If
cn = New OleDbConnection
With cn
If .State = ConnectionState.Open Then .Close()
.ConnectionString = "Provider=Microsoft.ACE.OLEDB.4.0;Data Source=C:\db1.mdb;Persist Security Info=False"
.Open()
Dim Sql As String = "select test1 from Table1"
Dim DA As New OleDbDataAdapter(Sql, cn)
Dim DS As New DataTable
MsgBox(cn.ConnectionString)
DA.Fill(DS)
If DS.Rows.Count > 0 Then
MsgBox("jj")
MsgBox(DS.Rows(0).Item("test1"))
End If
End With