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

The object invoked has disconnected from its clients

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Hi,

I have one application (standard exe) that opens one dll (with forms, classes inside it).

After the dll is called I get the main form (from the dll). However, if I click in anything on it I get this error message: "Run-time error - 2147417848 The object invoked has disconnected from its clients"

the code I´m using is this:

On the main exe:

Dim con As ADODB.Connection
Dim lcl_prof As Prof.CLS_Start

Set lcl_prof = New Profissao.CLS_Start
Set con = New ADODB.Connection
con.Open "Provider = MSDAORA.1; Data source = bdgrc; user id = userid; password = userpw;"
lcl_prof.ligacaoBD con 'passing the connection by ref
End Sub


On the dll: (only the begining code)

Public sub ligacaoBD(ByRef con As ADODB.Connection)

Set gbl_conPri = New ADODB.Connection
Set gbl_conPri = con
FRM_prof.Show

End Sub

After the FRM_prof appears I will call another form... etc...like an independent application.

However I receive that error :(

Any help is appreciated

Thank you
 
Hi,

I forgot to say that these applications work well toghether in debug mode. However, in compile mode the problem arise :(

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top