Problems using ADO with multi threading

From: Tim Hägele (tim.haegele_at_e-pro.de)
Date: 09/27/04

  • Next message: Viatcheslav V. Vassiliev: "Re: Problems using ADO with multi threading"
    Date: 27 Sep 2004 01:45:22 -0700
    
    

    Hi!

    I have strange problems using ADO in a multi-threaded environment!

    I am developing a SOAP-Service using Delphi SOAP-Components and Indy as HTTP-Service. The service accesses a database and returns complex data (more than one DB-Query per SOAP-Query) Everything works fine, except when a larger number of users are sending requests in parallel to the server (8 clients requesting data in loops). With this scenario I receive different exceptions (with SQL-Server and Oracle OLE-DB-Objects):

    ListIndexOutOfBounds:
       This exception occurs occationally when sending a select-query to the database. Maybe it occurs while parameter replacing, do not know exactly ...

    InvalidTypeCast:
       This exception occurs while executing a query with a TDateTime Parameter. It occurs only on very fast CPUs ~3GHz. This exception occurs in a subsystem and the debugger does not step into the code where it occurs ... it doesnt even stop at any place in my code ...

    AccessViolation:
       The behaviour is the same as with InvalidTypeCast above.

    I do not exactly know if the last exceptions are raised from ADO or maybe Indy, but I think they are raised from ADO because of the InvalidTypeCast Exception which occurs frequently when checking the validity of an element pool with a database query.

    Does anybody have an idea what the problems may cause?

    Thanks in advance!

    Kind regards,
    Tim


  • Next message: Viatcheslav V. Vassiliev: "Re: Problems using ADO with multi threading"

    Relevant Pages

    • Re: Is ADO Dead (3)?
      ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
      (comp.databases.ms-access)
    • Re: Is ADO Dead (3)?
      ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
      (comp.databases.ms-access)
    • Re: Is ADO Dead (3)?
      ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
      (comp.databases.ms-access)
    • Re: Is ADO Dead (3)?
      ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
      (comp.databases.ms-access)
    • Requery of Listbox does not display new data
      ... add a record to the database. ... Then the Lisbox control's requery method is ... The ADO command is run using a connection string to the mdb containing the ... Dim cmd As ADODB.Command ...
      (microsoft.public.access.formscoding)