Is it possible to use ADO in threaded service app?

From: Michal R (michal_at_topindex.cz)
Date: 11/30/04


Date: Tue, 30 Nov 2004 12:09:18 +0100

I have tried to build service application with threads.
Each thread makes connection using ADO to SQL server, then do some
operations, and update status in db.
This is repeated in thread's execute procedure till service is stoped.

I have declared ADO DB connection and query for each thread, at the first
time
in thread I call CoInitialize, then I create DB objects, do operations and
freeing DB object and then call CoUnInitialize.

My questions are:

-Is there a limitation of thread and db connection count, which can be used
at the same time? Is there relation to ole db provider?

-When I use as ole provider Microsoft Jet 4.0 (for storing data use Access
DB) there are still memory leaks! By using ole db provider for ODBC with
combination with MySQL it seems to be workin without memory leks? Any
solution?

-When service is running at computer with one cpu, all works fine, but when
service is running on 2 or more cpus computer, sometimes service is causes
in threads execute procedure exception with message "Invalid pointer
operation" or "Error exception in module at adress...". Is threre limitation
to use ADO/Threads on multiprocessor platform?

-Exists anywhere sample or information, how to correctly write threaded
service application in combination with ADO?

-Is better in threaded service app to use ADO eventually DB express
connectin?

Thank you for help,
Michal R.



Relevant Pages

  • Re: Unbekannter Fehler mit dem SQL Server OLE DB Provider
    ... > ADO 2.8 und den OLE DB Provider verwenden. ... Next by Date: ...
    (microsoft.public.de.sqlserver)
  • Re: C++ support for ADO
    ... TESTHR(pConn.CreateInstance(__uuidof(Connection))); ... In answer to your question I'm interested in ADO not the ADO.net. ... data classes for working with ADO/OLE DB. ... You can also use the OLE SDK. ...
    (microsoft.public.data.ado)
  • Re: C++ support for ADO
    ... In answer to your question I'm interested in ADO not the ADO.net. ... I have the following code compiled and running up to the OPEN Connection: ... data classes for working with ADO/OLE DB. ... You can also use the OLE SDK. ...
    (microsoft.public.data.ado)
  • Re: C++ support for ADO
    ... In answer to your question I'm interested in ADO not the ADO.net. ... I have the following code compiled and running up to the OPEN Connection: ... data classes for working with ADO/OLE DB. ... You can also use the OLE SDK. ...
    (microsoft.public.data.ado)
  • Re: C++ support for ADO
    ... TESTHR(pConn.CreateInstance(__uuidof(Connection))); ... In answer to your question I'm interested in ADO not the ADO.net. ... Not familiar with workgroup information file. ... You can also use the OLE SDK. ...
    (microsoft.public.data.ado)