Skip to Content
0

Why Powerbuilder 12.6 is stopping to work when copying bulk records from datawindow to excel

Jun 27, 2017 at 11:56 AM

151

avatar image

One of our applications has a functionality of exporting the datawindow retrieved records to excel(xlsx). Recently, we have faced an issue that the Powerbuilder 12.6 is getting stopped to work while exporting bulk records to excel. We have a code logic in such a way that, before exporting the records to excel, the retrieve records will be copied to Clipboard from the datawindow through this code (dw_1.SaveAs("filename", Clipboard!, TRUE))and then, the excel will be copied with the details from the clipboard through OLE objects. The issue occurs( Powerbuilder 12.6 has stopped working) occurs when copying bulk records from the datawindow to the clipboard.

The application is getting stopped to work when the below code is started to run.

dw_1.SaveAs("filename", Clipboard!, TRUE)

Screenshot of the message is attached below.

powerbuilder-export-issue.png

Note: The issue even persists in Powerbuilder 12.5.

It would be really helpful if we get any fix for this issue at the earliest.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Chris Pollach Jun 27, 2017 at 01:48 PM
0

HI Padmagowr;

Can you tell us ...

1) MS-Windows edition you are using

2) PB 12.6 build number

3) How much memory you have on your PC.

4) Does this always fail on the 1st attempt?

Regards ... Chris

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Chris,

Please find the details below.

1)Windows 7 64 BIT operating system

2)PB 12.6 4098

3)8GB Primary memory

4)Yes

0
A V Jun 28, 2017 at 08:38 PM
0

It would be better if you explained why there was a need to copy rows to the clipboard.

But I agree with Roland - you should use SaveAs excel. Copying rows to clipboard and then saving it will use up more memory than a regular SaveAs. Plus loading oleObjects takes up additional memory. If you need to call ole functions I would suggest you do so after SaveAs has been completed perhaps in seperate function.

Share
10 |10000 characters needed characters left characters exceeded
Roland Smith Jun 27, 2017 at 03:08 PM
0

Why not just do a SaveAs to an Excel file? Why the clipboard? If you need it in both, you could copy all the cells from Excel (manually or via OLE commands).

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Roland,
Thanks for your Suggestion.
We have tried even directly exporting the datawindow records to excel, but still we are having the same issue.
The code was perfectly working in the year of 2012 with MS Excel 2007 (.xlsx) and PB version 11.5.
Now, we have migrated our code to PB 12.6 and the excel version in our machine is 2010. We cannot even suspect what would be reason for this issue now.

Kindly provide us alternative options to fix this issue.

0

It could just be much slower. Can you move the process to a background thread using the SharedObjectXxxxx functions? That would allow the user interface to remain responsive. You would have to prevent the user from exiting the app until the background thread completed.

0