In a single word probably COM issues.

I would have to presume that the app dies because an exception is being
propagated out of the thread - this will always cause an app to crash.

We always add a try except clause around the thread execute procedure in the
classes unit to stop this issue - don't believe the Borland docs on this
one.

How are you passing the parameters between the threads?

Do not use Sleep() or SleepEx() on the update thread in conjunction with
ADO.

Myles.



-----Original Message-----
From: Stephen Bertram [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 May 2003 8:53 a.m.
To: Multiple recipients of list delphi
Subject: [DUG]: ADO funny


Hi All

A strange occurrence which I am unable to explain, but I feel that I have
seen before.  This is with Delphi 5 and SQL Server 2000.

We have a thread which updates a SQL Server database via a stored procedure
when monitored data in the application is changed or added.  The thread
instantiates its own TADOConnection and a TADOStoredProc.  As changed data
is detected the TADOStoredproc's parameters are updated and the ExecProc
method called. The purpose of the thread is to pipeline database updates
from the 20 - 500+ execution threads handling client processes. 

On one machine (Windows Server 2000) the second time the ExecProc method is
called the application vanishes - no errors, no Dr Watson.  On all other
machines we run it on the application behaves beautifully.  The failure
occurs with only 12 active threads, so it does not seem to be load related
as the application happily runs in the real world with over 1500 threads.

The fix has been to instantiate the TADOStoredProc for every database update
and then free it.  While this works it is not elegant and as it may run up
to 100 times a second the inefficiency is a problem.

Any ideas what may be the cause, either from the ADO components or the
Windows 200 Server environment?

TIA

Stephen
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to