M
Mike Scirocco
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
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