Records lost in an ADOStoredProc

From: Gonzalo Torres (condormix2001_at_yahoo.com.mx)
Date: 12/23/04

  • Next message: danny heijl: "Re: Slightly OT : threads"
    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;


  • Next message: danny heijl: "Re: Slightly OT : threads"

    Relevant Pages

    • Re: ADO - lost records with asynchronous fetching
      ... the problem is that I execute a TADOStoredProc ... Furthermore AsyncFetch and AsyncFetchNonblocking set to True doesn't allow ... I don't need to show records, only to execute the store procedure. ...
      (borland.public.delphi.database.ado)
    • ADOConnection TimeOut 30 second, no way to change it ???
      ... i use ADOConnection component to connect to SQL Server and using TQuey to ... When i execute the store procedure, it look like the setting is no effect ...
      (borland.public.delphi.database.ado)
    • Update or Insert in tableadapter not working
      ... Hi, I have a store procedure to insert, and I use tableadapter to execute this store procedure, when I run the application and execute the sp with: ... or Any idea to execute the store procedure to insert or delete or update rows in SQL Server 2005 data base using C# 2005. ...
      (microsoft.public.dotnet.framework.adonet)
    • Insert and update dont work
      ... Hi, I have a store procedure to insert, and I use tableadapter to ... execute this store procedure, when I run the application and execute the ... insert or delete or update rows in SQL Server 2005 data base using C# ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Delphi 6 - ADO - MS SQL Server
      ... have several connections to different databases running at the same ... I don't use TADOStoredProc, I just Execute on the connection, checking ...
      (borland.public.delphi.database.ado)