feedback fro oracle stored procedure

Questions, tips and tricks and techniques for scripting in Servoy

feedback fro oracle stored procedure

Postby Hans Nieuwenhuis » Wed Aug 24, 2011 11:53 am

Hi,

I have some Oracle stored procedures that may run for 10 or 20 seconds.
I want to give the user feedback.

I am thinking about the following scenario :

- The stored procedure writes it's progress to a field in a progres table.
- show this table/field in the form from which the stored procedure is started .

But how can I do a refresRecordFromDatabase whilst the stored procedure is running ?

- start a cronjob before starting the stored procedure and do the resfresh every few seconds ?

- or ????

Or is there a better scenario to achieve this ??

Regards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: feedback fro oracle stored procedure

Postby pbakker » Mon Aug 29, 2011 4:48 pm

As the Servoy Client is single threaded, whatever way you kick off the stored procedure doesn't matter: the UI will be blocked until the sp is done.

Only option would be to offload the execution of the sp to a other client, for example a headless client. Once you do that, the technique you contemplating to use to give the user feedback will work just fine.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: feedback fro oracle stored procedure

Postby Hans Nieuwenhuis » Mon Aug 29, 2011 5:17 pm

Hi paul,

In the last few days I did just that. ( using a headless client )

Works excellent !!!

Regards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands


Return to Methods

Who is online

Users browsing this forum: No registered users and 12 guests