I have an ADO connection and a few recordsets; One of them I have to query a lot.
When I do this:

RS.Open "SELECT * FROM TableName WHERE FieldName = " & ID, DB, adOpenForwardOnly, adLockReadOnly


It gives me an error saying:
Runtime error '3705':
Operation is not allowed when the object is open.


I know I need to close the recordset before querying it again, but when I try to use RS.Close, it says it can't because the object is already closed.

From that I understand that I can call RS.Close only when it's open, but how do I check if the Recordset is open or closed?

And another question:

If I create a connection like this:

DB.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\database.mdb"


Do I have to include a reference to MSJRO.DLL - Microsoft Jet and Replication Objects 2.5 Library?


Thanks.