UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Ado Reference, Access 2010    
 
   
rzw0wr
post Nov 14 2019, 07:36 PM
Post#1



Posts: 322
Joined: 28-March 12
From: Indiana


I am trying to use ADO rrecordset.

Do I need to set some reference for this?

As I remember from a few years back I did need to.


Thanks,
Dale

--------------------
Access 2010 32 bit.
Not really very good at access.
Go to the top of the page
 
theDBguy
post Nov 14 2019, 08:10 PM
Post#2


UA Moderator
Posts: 76,894
Joined: 19-June 07
From: SunnySandyEggo


I think you do. I'm not sure if it can be late bound.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
WildBird
post Nov 14 2019, 09:23 PM
Post#3


UtterAccess VIP
Posts: 3,677
Joined: 19-August 03
From: Auckland, Little Australia


Usually its Microsoft ActiveX Data Objects 6.0 Library. Setting a reference to it will get intellisense, just remember to fully qualify recordsets as DAO also has recordset objects.

CODE
dim rst as ADODB.Recordset

not
CODE
dim rst as Recordset

--------------------
Beer, natures brain defragging tool.
Go to the top of the page
 
cheekybuddha
post Nov 15 2019, 03:28 AM
Post#4


UtterAccess Moderator
Posts: 11,915
Joined: 6-December 03
From: Telegraph Hill


>> I'm not sure if it can be late bound. <<

You can late-bind.

In some instances you do not even need to do that. E.g.
CODE
  With CurrentProject.Connection.Execute("SELECT * FROM YourTable")
    If Not (.BOF And .EOF) Then
      Do Until .EOF
        Debug.Print .Fields(0), Fields(1), Fields(2)
        .MoveNext
      Loop
    End If
    .Close
  End With

The above will work without any ADO reference set.

You will need to know the numeric values of any ADO constants (and re-declare them to make your code readable)

As Coop says, make sure you fully qualify your object declarations. That also means qualifying existing DAO recordsets in your code.

Why do you want to use an ADODB recordset anyway?


--------------------


Regards,

David Marten
Go to the top of the page
 
theDBguy
post Nov 15 2019, 12:33 PM
Post#5


UA Moderator
Posts: 76,894
Joined: 19-June 07
From: SunnySandyEggo


Hi David. Thanks! thumbup.gif

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    14th December 2019 - 04:58 AM