View Single Post
  #17 (permalink)  
Old 03-10-2011, 09:30 AM
nl1007 nl1007 is offline
Junior Member
 
Join Date: Jul 2009
Location: Derbyshire, UK
Posts: 36
Default RecordCount, ErrorCheck..

I got the field names, using:
Fields() = objADO.strReadFieldsParameter(1)
but still get an error if I declared Fields() As String..

Next, I opened a table and tried using RecordCount to find out how many records matched the criteria - but got a value of -1 returned.
I got round that by testing for "EOF", and although it worked initally, when I tried to use it again, I got "EOF" immediately - as if it hadn't been reset..
I tried using a using a 'Count(*)' query first, but ErrorCheck(True) still returns "EOF", so I can only retrieve one record. Using 'MoveLast' and 'MoveFirst' didn't fix the 'RecordCount', or the "EOF", so I can't step through the records - because I don't know when I've got to the end!
(I copied the generated SQL into MSAccess, to make sure it was correct)

Nigel
Reply With Quote