简体   繁体   中英

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

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM