Re: Records lost in an ADOStoredProc

From: J West (jimw_at_fluffypaws.co.uk)
Date: 12/24/04

  • Next message: wp_xxyyzz: "Average of logarithms"
    Date: Fri, 24 Dec 2004 18:51:36 -0000
    
    

    Typically what I have done in the past is to set up a "Job" to run under
    MSSQL as an overnight script.
    The other option to do is to split the job into seperate functions and
    process them as different jobs but this all depends on what your logic is
    like.
    Other alternatives to consider are

    1) To set up a table view.
    2) Set up a new table that contains all the data that you need and populate
    using triggers on the tables that you are getting the information from
    thereby "Pre-Processing" the data..
    3) Check your SQL syntax in the stored procedure and make sure you are using
    joins properly.
    4) Use a thread to fire off the stored procedures so that your application
    doesn't freeze!
    5) Upgrade the server!

    There are many other solutions to this problem and I am sure others will
    have some good sugestions but you really need to post the SQL from the
    stored procedures in order to check properly and the priority should be to
    make sure that they are working as efficiently as possible so you are not
    inadvertantly "Locking" other processes out.but strangling the network with
    data traffic and or overloading the server.

    If written/designed properly you should be able to process 100,000 records
    in minuites!

    Millions of phone bills can be calculated in a couple of hours and thats on
    very old operating systems with old hardware!

    Regards!
    James West!

    "Gonzalo Torres" <condormix2001@yahoo.com.mx> wrote in message news:41cb18d6
    $1@newsgroups.borland.com...
    > 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: wp_xxyyzz: "Average of logarithms"

    Relevant Pages

    • Extreme performance issues (SQL Server 2000/ADO.NET/C#)
      ... same exact stored procedures and views, run in the same exact order, through ... system that runs SQL Server (a 4-cpu Xeons system with 2gigs of physical ... When I execute these steps manually through query analyser,, ...
      (microsoft.public.sqlserver.server)
    • Sybase, JDBC, AutoCommit, DDL IN TRAN
      ... having executing Sysbase stored procedures via JDBC. ... stored procedure which contains DDL and with AutoCommit set to false I ... The explanation for this behaviour I have found is that the JDBC ... I need to be able to set AutoCommit to false and execute multiple ...
      (comp.lang.java.databases)
    • Re: Sybase, JDBC, AutoCommit, DDL IN TRAN
      ... > having executing Sysbase stored procedures via JDBC. ... > stored procedure which contains DDL and with AutoCommit set to false I ... > The explanation for this behaviour I have found is that the JDBC ... > I need to be able to set AutoCommit to false and execute multiple ...
      (comp.lang.java.databases)
    • Re: call Stored procedure with no params
      ... All stored procedures are exposed as methods of the Connection ... This means you can execute a procedure "Fred" like this: ... so you have parameters (most SPs do). ... Where 5522.22 is a non-string parameter value. ...
      (microsoft.public.data.ado)
    • Re: Need to stop form from going to first record
      ... and deletes to use either SQL or stored procedures so that I ... can validate everything before I let it get into the back-end ... If you're going to manage all updates yourself, you really ought to be using ... MsgBox "Cannot update the database because ... ...
      (microsoft.public.access.formscoding)