>>Well, to get to the point, these invoices are obtained through a remote view, this takes on average, about 4 or 5 seconds to execute, meanwhile the user thinks that his PC has frozen and begins to get impatient.
>>
>>Is there a way to display a progress bar (or at least an animated gif) while the remote view (or in some cases) stored procedure is running?
>>
>>TIA
>
>OK, I'm guessing the back-end database is something like SQL Server or Oracle. If that's the case, I'm not aware of any way to show a visual based on the progress of the query.
Well there is a way in SQL server, at least if you have the proper rights:
SELECT
percent_complete
FROM sys.dm_exec_requests
WHERE session_id=51
The session ID is the session on which it is running the query. You'll need to run the query asynchronously and use another connection to run the query above to get the status of the query.
Its quite a bit of work and I agree that this might not be the right approach.