• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1102
  • Last Modified:

How to pause and resume retrieve in PowerBuilder9

Hi,

We have a problem of retrieving huge amount of rows from database ( Oracle 8i ) with PowerBuilder 9.
What we need to do is to first retrieve a batch of rows, e.g 2000 first rows and then ask from user whether to continue retrieving (in case there is more to retrieve) or not.

However after that guestion, resuming retrieve crashes the application. With PowerBuilder 7 there was never this problem.

Code is placed in user objects retrieverow -event.

Thanks in advance,
JT
0
Yenny1
Asked:
Yenny1
  • 4
  • 2
1 Solution
 
sajuksCommented:
Are you working with the latest patch of powerbuilder ? Whats your current version?
to download the patches one of the experts diasroshan has given some precise steps:

Go to http://www.sybase.com
---> go to the download option
---> in the download page there is a link EBFs/Maintenance
---> u will be asked to register once u go to that link....
---> register onto sybase(this will help in future)
---> there will be a selection of time frame...select 'all'
---> now when u search u will find build  PowerBuilder 9.0.1 (7275) EBF Release
---> Download it
Install this patch .
0
 
sajuksCommented:

Have you tried using retrieveasneeded ( note it wont work if you've sort or filter).
0
 
Yenny1Author Commented:
Unfortunately RetrieveAsNeeded didn't work out.

The actual error which occurs is this, in case this tells more:

Database error code:  999
Database error message:
Select error: Only cancel command is allowed when the rows are pending.
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
sajuksCommented:
Did you update to the latest patch ? that didnt work ?

Have you got any more selects ?If yes then you need to create a second transaction
object as an instance variable, connect it to thedatabase, and use it for those other retrieves.


0
 
michaelstoffelCommented:
You could retrieve in batches, just appending to the datawindow result set instead of overwriting.  Pass in the range of records to retrieve as additional parameters and use rowid to limit the result set.  To append data return a 2 from the retrievestart event of the datawindow.  That way you avoid the retrieverow event with its performance hits.  What is the user realistically going to do with thousands of rows in a UI?

Mike
0
 
Yenny1Author Commented:
Thanks sajuks!

It seems this error occured because there was other select  running ( asking question was retrieved from database ).

Patch didn't help.

JT
0
 
sajuksCommented:
If my answer worked then why a C ? Please re-grade
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now