Status bar during query runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey there,

I've an special problem with a "mammouthtquery". This query will be started
as an
SQL-statement in VBA-code via RUNSQL and has a runtime up to 5 minutes.
To serve confusion of the user, I try to give out a timecouter or statusbar
in a
popupformular. So i call the form, bevore the program startup the query and
will
be canceled if the query finished.

The problem is, that the form with the bar will not be actualised during the
execution time of the query.

Has anyone an idea to solve the problem, or know, how it is possible to give
out an
optical display on screen during execution time of the query?
 
Fiete said:
Hey there,

I've an special problem with a "mammouthtquery". This query will be started
as an
SQL-statement in VBA-code via RUNSQL and has a runtime up to 5 minutes.
To serve confusion of the user, I try to give out a timecouter or statusbar
in a
popupformular. So i call the form, bevore the program startup the query and
will
be canceled if the query finished.

The problem is, that the form with the bar will not be actualised during the
execution time of the query.

Has anyone an idea to solve the problem, or know, how it is possible to give
out an
optical display on screen during execution time of the query?

As far as I know, the only way to do this would be to

1. Create an ODBCDirect workspace
2. In the workspace, create a connection to your database
3. In the connection, create a QueryDef object with the SQL you want to
run
4. Execute the QueryDef asynchronously
5. Use a form's Timer event to keep testing the QueryDef's StillExecuting
property until it has finished.

As you will have noticed, this is a somewhat more ambitious undertaking than
RunSQL!
 
Back
Top