Microsoft Dao 3.6 Object Library ,Microsoft ActiveX Data Object 2.8 Library Reference Issues
Posted on 2010-11-30
In my Visual Basic Project, I have added the references,
1. Microsoft Dao 3.6 Object Library
2. Microsoft ActiveX Data Object 2.8 Library – newly added reference and the below piece of code:
I am using MS Office 2000
Const DataProvider As String = "PROVIDER=MSDataShape;Data PROVIDER=Microsoft.Jet.OLEDB.4.0;"
Dim adoPrimaryRS As Recordset
Dim db As ADODB.Connection
'Execute the query.
Set adoPrimaryRS = New ADODB.Recordset
src = sql()
ADODB.adoPrimaryRS.Open src, db, adOpenDynamic, adLockOptimistic
Error - adoPrimaryRS - Method or Data memebr not found.
If I change the order of the reference, then the above code is working. but the existing code is not working.
It seems both above reference have conflict.