#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    Scotland
    Posts
    16
    Rep Power
    0

    Unhappy Reopening A Query !!!!


    hi

    I Need help I have a program which is to automate a batch job when a count reaches 0 the count is ain a view within the database my problem is refreshing the count

    here is the code

    with adoquery2 do
    begin
    adoquery2.close;
    adoquery2.open;

    if FieldByName('version').AsString = 'FINAL' then
    begin
    WriteLog( 'Sales Report has been set to FINAL' );
    if int = 0 then
    begin
    if FieldByName('stores').AsString = '0'then
    begin
    if FieldByName('version').AsString = 'Latest' then
    begin
    if not ind then // program not ran
    begin
    RunProg('c:\updver.bat', 'c:\');
    ind := True;
    int := int + 1 ;
    WriteLog( 'Sales Report has been set to FINAL' );
    end; // if not ind then
    end;
    end;
    end;


    end;
    adoquery2.Free;

    any ideas why it is not refreshing the query !!!???
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Romania
    Posts
    173
    Rep Power
    10

    Lightbulb


    Maybe the transaction is not yet commited

IMN logo majestic logo threadwatch logo seochat tools logo