Records lost in an ADOStoredProc
From: Gonzalo Torres (condormix2001_at_yahoo.com.mx)
Date: 12/23/04
- Previous message: Brian Bushay TeamB: "Re: Simple SQL Question"
- Next in thread: J West: "Re: Records lost in an ADOStoredProc"
- Reply: J West: "Re: Records lost in an ADOStoredProc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Dec 2004 13:17:15 -0600
Hi
I have a situation, 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;
- Previous message: Brian Bushay TeamB: "Re: Simple SQL Question"
- Next in thread: J West: "Re: Records lost in an ADOStoredProc"
- Reply: J West: "Re: Records lost in an ADOStoredProc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|