Re: ADO - lost records with asynchronous fetching
From: Gonzalo Torres (condormix2001_at_yahoo.com.mx)
Date: 12/15/04
- Next message: J West: "Re: ADO connection causes a freeze"
- Previous message: J West: "Missing blobs!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 15 Dec 2004 10:15:25 -0600
Hi
I have a similar situation, the problem is that I execute a TADOStoredProc
to calculate
salaries from different tables. This store procedure lasts about 45 minutes,
and as it's
executing in a synchronous mode, so it doesn't allow me to show a counter or
a progress bar,
until it finishes the process. Let's suppose it updates 75400 records.
If I change the ExecuteOptions property it only updates 75398 records when
the CacheSize
is set to 1; it is worse when I increase the CacheSize.
Furthermore AsyncFetch and AsyncFetchNonblocking set to True doesn't allow
me to show a
counter because it still freezes the program.
I'm using Delphi 6 under WinXP.
I don't want to change the threat priority. Even if I wanted to, I don't
know how.
I don't want to use the BetterADODataset either.
I don't need to show records, only to execute the store procedure.
If there's a way by using a recordset like the other examples? how can I
solve the problem?
Here is the code for the calling to the TADOStoreProc:
procedure TPrima.GenerateSalaryClick(Sender: TObject);
begin
if strtofloat(MinimumSalary.text) <= 0 then
showmessage('Wrong Salary')
else
begin
Screen.Cursor := crSQLWait;
DMNominaRep1.DatosRep1.ADOSTPPRIMAVAC.Parameters.Items[1].Value :=
strtofloat(MinimumSalary.text);
DMNominaRep1.DatosRep1.ADOSTPPRIMAVAC.Parameters.Items[2].Value :=
sTRtOdATE(period.text);
DMNominaRep1.DatosRep1.ADOSTPPRIMAVAC.Open;
Screen.Cursor := crDefault;
SHOWMESSAGE('Process Finished');
end;
end;
- Next message: J West: "Re: ADO connection causes a freeze"
- Previous message: J West: "Missing blobs!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|