Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jun 27, 2017 at 01:48 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Jun 28, 2017 at 08:38 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 27, 2017 at 03:08 PM

    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).

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.