Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


How to pause and resume retrieve in PowerBuilder9

Posted on 2004-10-25
Medium Priority
Last Modified: 2013-12-26

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,
Question by:Yenny1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
LVL 33

Expert Comment

ID: 12407831
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 .
LVL 33

Expert Comment

ID: 12407867

Have you tried using retrieveasneeded ( note it wont work if you've sort or filter).

Author Comment

ID: 12409189
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.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 33

Accepted Solution

sajuks earned 750 total points
ID: 12409230
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.


Expert Comment

ID: 12414594
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?


Author Comment

ID: 12441809
Thanks sajuks!

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

Patch didn't help.

LVL 33

Expert Comment

ID: 12442169
If my answer worked then why a C ? Please re-grade

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question