Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object was opened

Status
Not open for further replies.

ching0418

MIS
Mar 6, 2002
96
HK
hello guys,

do you have any idea why i receive this error message

Run-time error '-2147217915 (80040e05)':
Object was open

There are two cases in which this error is encountered:

1. A 'Low in Virtual Memory' error is encountered is encountered first, then the message stated above pops up; or
2. Two computers are running the program.

please help!

thanks in advance,
Cheryl
 
Hi Cheryl:

I have received this message whenever I try to open a database connection that was already open. Usually, the problem is that I forgot to close the database connection on a previous access to the database.

The best thing to do is to ensure that you close the connection after transferring data to/from the database. I use the following code:
Code:
    If m_cnnMyDB.State <> adStateClosed Then m_cnnMyDB.Close

The sloppy (bad) way is to get around the error on open is to
Code:
    If m_cnnMyDB.State <> adStateOpen Then m_cnnMyDB.Open

HTH,
Cassandra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top