Run-time error '3704'

Run-time error '3704'

Post by PAN » Sat, 09 Jun 2001 23:37:33



Hi,

I'm using VB6(SP4), ADO 2.5 and SQL7.0.  I use SQLOLEDB provider to open a
recordset.  I refresh (open with a new SQL statement) this recordset inside
a Timer every so often.  It's working fine but every now and then I get this
error message:
    Run-time error '3704'
    Operation is not allowed when the object is closed.

The program stops and I have to re-start it.

I close the recordset then re-open it with the new SQL statement, and that's
the only time I close the rs.

Anyone has any ideas of what's happenning?  Thanks.

PAN

 
 
 

Run-time error '3704'

Post by David Brown » Sun, 10 Jun 2001 07:28:45



Quote:> Hi,

> I'm using VB6(SP4), ADO 2.5 and SQL7.0.  I use SQLOLEDB provider to open a
> recordset.  I refresh (open with a new SQL statement) this recordset
inside
> a Timer every so often.  It's working fine but every now and then I get
this
> error message:
>     Run-time error '3704'
>     Operation is not allowed when the object is closed.

> The program stops and I have to re-start it.

If your program stops on this error,
I think you need some error handling.

Other than that post some code.

Do you "open" the recordset with connection.execute?
If so you are really getting a new recordset object.
EG

set rst1 = rst
rst.close
set rst = cn.execute sSQL

rst1.movefirst
^     Operation is not allowed when the object is closed.

David

 
 
 

Run-time error '3704'

Post by Pete » Tue, 12 Jun 2001 15:45:46


Can you please post your source code so that I can check it clearly?

Also, here are 2 KB articles that may be of some help.
Q235340 PRB: Error Message Referencing #Temp Table with ADO-SQLOLEDB,
http://support.microsoft.com/support/kb/articles/q235/3/40.asp
Q236539 MOD2000: Errors When You Open Codelib.mdb from Read-Only Share,
http://support.microsoft.com/support/kb/articles/q236/5/39.asp

Peter