Subject | Re: [IBO] Timers in Delphi during a DSQL execute |
---|---|
Author | Martijn Tonies |
Post date | 2006-04-28T08:53:10Z |
Hello Russel,
returns and not process any windows messages. In order for TTimer
to work, the application has to respond to windows messages.
If you want this to work, execute the procedure in a thread.
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> Not sure if this is a proper IBO question ...If you use Execute, the applications main thread will wait until it
>
> I run a lengthy stored procedure whose execution time I estimate and
> during its execution would like to update a progress bar on a TTimer
> event. When Execute is entered the TTimer event is effectively
> suspended. It is not called. Is this expected? Can I do something
> else
> to achieve updating a progress bar?
>
> dm is a data module used by the form containing the code below. The
> TTimer is in the code module.
>
> with dm.dsqlWrite do
> begin
> SQL.Text := 'execute procedure CALC_CONTACT2_RECS ' +
> QuotedStr(DateToIBDate( TDate(DTStart.date)))+', '+
> QuotedStr(DateToIBDate( TDate(DTEnd.date)));
> Prepare;
> Execute;
> // TTimer event not called while in Execute
returns and not process any windows messages. In order for TTimer
to work, the application has to respond to windows messages.
If you want this to work, execute the procedure in a thread.
> contact2ID := fields[0].AsInteger;Martijn Tonies
> RecCount := fields[1].asInteger;
> end;
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com