How should my procedure let the DataWindow know it's not dead?

305 Views Asked by At

I have an InfoMaker report that gets results from a stored procedure, but this procedure stalls for a few seconds (intentionally) before returning the result set. When I run and view the report, this causes the PowerBuilder application to freeze until the procedure returns.

I have seen other reports that take a long time to run display a status bar inside the application before the procedure completes and the report is displayed. Is there something I should do in my InfoMaker report or T-SQL procedure to make this happen?

1

There are 1 best solutions below

0
On

Normally, once the DW has retrieved the first row, the DW control becomes asynchronous - meaning will allow interference manually or by program. If you want to make the window responsive, before connecting to the DB, set the SQLCA.DBParm property to Async=1. This will make the DW and the Window responsive.

If you have a status bar, you can use the timer event to update the status bar with whatever text you want to display there. Like "Pulling the data in 10s..." and then doing a count down using the timer event.