Hi.... I know this post should be at the database forum. But the thing is... this is a very simple one!!!! And.... in the database forum there are not a lot of responses!

OK.. so.... I am doing this to know what is the amount of records that a query gets:


VB Code:
  1. dim record1 as recordset
  2.  
  3. dim a as integer
  4.  
  5. 'base is set to a database thru ODBC
  6. set record1=base.execute("select * from table")
  7.  
  8. a= record1.recordcount


but "a" will always be -1. How can I know the total of the records that a query gives me?


Thank you