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
Yenny1Asked:
Who is Participating?
 
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
 
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
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.