3021 error on GetRows?

  • Thread starter Maury Markowitz
  • Start date
M

Maury Markowitz

I have a simple query:

getem.Open "SELECT distinct code, name FROM vOpenPositionsExpanded
WHERE secTypeId IN (150, 151, 160, 161, 235, 236) ORDER BY code", cnn,
adOpenStatic, adLockReadOnly

This returns 108 rows, and if I open "getem" in the quicklook, I can
see the data is correct. I then try...

getem.GetRows(getem.RecordCount)

and get a 3021, and looking in quicklook I can see that EOF is true.
Huh?

I use both of these techniques in literally hundreds of places in my
code, anyone have an idea why it would fail here? It's a new workbook
with DAO and ADO imported. Do I need anything else?

Maury
 

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

Top