I typically see this when an ADODB connection has not been opened, and then you try to open a recordset with the still closed connection;
for example:
dim conn As New ADODB.Connection
conn .ConnectionString = Provider=SQLOLEDB;Persist Security Info=False;User ID=sa;Password=unknown;Initial Catalog=pubs;Network Library=dbmssocn; Data Source=someserver;
conn .CursorLocation = adUseClient
'--commented out to duplicate error!
'conn.Open
dim rs as new adodb.recordset
rs.Open "SELECT * FROM AUTHORS", conn, adOpenStatic, adLockReadOnly
--THIS WILL RAISE THE ERROR BECAUSE THE CONNECTION IS NOT OPEN
In an app I had, the connection was opened in a separate procedure with on error resume next, and then a different procedure, which assumed the conn was .Open would raise the same error, because the previous connection failed error was supressed.
hope that helps
Lowell