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

Disconnecting clients from automation server.

Status
Not open for further replies.

nanin

Programmer
Aug 29, 2003
13
ES
I have built a program to manage DB operations. This program acts as stand-alone application or a automation server if a client requests any action from a external program.

If a user attempts any action, the server opens and stay opened. If the user press the "close" button in the server program, the server shows a message like "there are still active COM objects in this application.One or more clients may have references to these objects....".

the question is: Is there any way to disconnect all clients from server-side without any messages?


Thanks!!
 
a standard operation in COM API is
yourInterface->Release();

yourInterface should be the interface you have got while calling CoCreateInstance.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
I do not use CoCreateInstance to run the server. I have imported the Type library from the server into the client program and I directly open it with this expression:

this->SvrMyVisdata1->LanzaListado(Conexion,SQL);

where SvrMyVisdata is the reference to the server, Conexion is the string conexion to the database and SQL is the requested operation to the DB.

This sentence opens the server and lists the registers, you selected with the SQL parameter, from the database.

any idea?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top