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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error No. -2147217915 - vb6.0

Status
Not open for further replies.

khotha

Programmer
Jul 19, 2001
6
When I Tried to execute the completed vb application(.exe),
this error terminating the application saying "object was open".I've used OLE DB(Data Provieder) and MS Access as Backend.Can any one help me... urgent.
 
This error is defined as the following:

0x80040E05 -2147217915 An object was open

This likely means that you are trying to open a recordset or connection which is already open.

I have implimented an error message system, that will generate more descriptive error messages:


Public Sub adoWriteError()
Dim e as ADODB.Error

For Each e in adoConn.Errors
MsgBox e.Description
Next e
adoConn.Errors.Clear
Set e = Nothing
End Sub

Then, in the sub where you are connecting to the database, insert the following at the top:

On Error Resume Next

Directly after you open the connection, check for the error:

If (adoConn.Errors.Count <> 0) Then
Call adoWriteError
End If

Hope this helps. :-> Best Regards and many Thanks!
Michael G. Bronner X-)

&quot;Who cares how time advances? I am drinking [beer] today.&quot; Edgar Allan Poe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top