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
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