Is it possible to use ADO in threaded service app?
From: Michal R (michal_at_topindex.cz)
Date: 11/30/04
- Next message: Daniel Balieiro: "PgOleDB... Varchar problem"
- Previous message: Pavel: "Re: Migrating from MDB database to internet"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Daniel Balieiro: "PgOleDB... Varchar problem"
- Previous message: Pavel: "Re: Migrating from MDB database to internet"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|