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.

Recommended Answers

All 2 Replies

Have a look at this link. might contain your answer..

Im unabled to found an answer.I will search more and let you know if donot find.If you have free time try to answer me.thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.