Questions about ADO

  • Thread starter Thread starter Hash
  • Start date Start date
H

Hash

All -

Working the issue of a large data import, Google led me to ADO. I have
the basic routine working, copyied from a European website.

Right now I determine the size of the import afterwards via xlend etc.
Is there a property I can access before the import (rs.recordcount or
somesuch) that will tell me what the number of records is beforehand so
I can size the copied data? Easy enough for me to do except when I want
all of them. Second question--same for number of fields.

Right now, I count field.names while field(i).name <> vbnullstring.
That gives an error, for which I continue on, and capture my counter. A
method that grates. What are the values of "empty" field.names? NULL
doesn't work either.


Thanks in advance.

....best, Hash
 
Hi Hash

Adding toRob: Note that recordcound won't work with cursor "ForwardOnly",
and that ForwardOnly is a lot faster than other cursors on certain systems.

HTH. Best wishes Harald
 
Very true - thanks Harald.

I also believe Server / Client side cursors will affect RecordCount.
Better to refer to the programmers reference and Provider documentation.
There is also a newsgroup devoted to ADO: microsoft.public.data.ado

To be honest, it's difficult remembering this stuff - I hardly ever deal
with ADO programming.
When I first started using ADO, I figured out what worked, wrote a wrapper
library and haven't touched it in years.
 
Harold, Rob, et al -

Thanks for the pointers and the website. rs.recordcount returned -1,
which the website says is a cursor problem. But with other methods
discussed there such as movenext to EOF and absolute size>0 I got the
insight I needed.

Thanks again.
....best, Hash
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top