I use following codes in my project.
Dim cnCheck As ADODB.Connection
Set cnCheck = New ADODB.Connection
Dim rsCheck As ADODB.Recordset
Set rsCheck = New ADODB.Recordset
cnCheck.Open "provider = microsoft.jet.oledb.4.0;persist security info=false;data source = " & App.Path & "\MyDatabaseNameHere.mdb"
cnCheck.CursorLocation = adUseClient
rsCheck.Open "SELECT * FROM yourtablenamehere WHERE id=" & txtid.text & "'", cnCheck, adOpenDynamic, adLockPessimistic
If rsCheck.BOF = True Or rsCheck.EOF = True Then
''no records found...
else
Set mshFlexgrid1.Datasource = rsCheck
end if
datagrid work properly and all records can be view at datagrid.but now problem is adodc in not working.I mean,when press the arrow buttons of adodc it donot move from record to record at datagrid.please help.