Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / September 2006

Tip: Looking for answers? Try searching our database.

error trying to use ADO to read table items

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Scirocco - 22 Sep 2006 07:09 GMT
I'm using Office 2000, getting run-time error 429 (activex component
can't create object) which fails on this code:

    Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset

I'm trying to read the text in one column of each row, send that text to
a function, and then enter the result returned by the function in
another column of the same row. I was using the approach below.

I'm pretty good with VB6 but a complete beginner with Access. Is there
any way to read a table from within Access without using ADO? I mean,
are there any tricks the application provides that allows direct table
interaction?

Thanks,
Mike

Public Sub DoHostNameLookup()
    Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset
    'Dim rs As Recordset
    'Set rs = New Recordset
    'Instantiate the Recordset -- provide memory for it on the heap
using New
    'This means that you have to remember to manually release that
memory when
    'you're don with the Recordset, or you'll get a memory leak
    rs.Open "Select * from IPAddressList", CurrentProject.Connection
    rs.MoveFirst
    Do While Not rs.EOF
        rs("HostName") = GetHostNameFromIP(rs("IPAddress"))
        rs.Update
        rs.MoveNext
    Loop
    Set rs = Nothing
End Sub
Mike Scirocco - 22 Sep 2006 07:46 GMT
> I'm using Office 2000, getting run-time error 429 (activex component
> can't create object) which fails on this code:
>
>     Dim rs As ADODB.Recordset
>     Set rs = New ADODB.Recordset
<snip>

Sorry, I ran componenet checker and it couldn't find a valid version of
MDAC! Tried installing version 2.8 but I'm getting errors (see below),
same with 2.7 and 2.5, Safe Mode doesn't help. At least I know what the
problem is now.

Mike

Advanced INF Installer
Error registering the OCX
c:\program files\common files\system\ado\msado15.dll
c:\program files\common files\system\ole db\sqlxmlx.dll
c:\program files\common files\system\ole db\sqloledb.dll
Steve Schapel - 23 Sep 2006 06:00 GMT
Mike,

First of all, the focus of this newsgroup is Macros in Access, and
although VBA procedures are sometimes referred to as macros in other
programs, this si not the case in Access.

I am not sure about the reason for the error you are experiencing.  I
would certainly recommend using DAO over ADO, but I don't think that is
related to your problem.

However, it seems to me that you can achieve what you want here with a
simple Update Query, in other words you are doing it the hard way.
Please post back if you need more explicit help with this aspect.

Signature

Steve Schapel, Microsoft Access MVP

> I'm using Office 2000, getting run-time error 429 (activex component
> can't create object) which fails on this code:
[quoted text clipped - 33 lines]
>     Set rs = Nothing
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.