1. Danish Ahamed LiakathAli
  2. PowerBuilder
  3. Wednesday, 2 September 2020 20:50 PM UTC

We have migrated from PB 10.2 to 2019 R2. In our earlier version we  do have only .xls export option of DW to the user. Now I have added the .XLSX  option to the export the file as excel format with '.xlsx' extension  with this syntax "DW.SaveAs( ls_Path, XLSX!, TRUE )" The data's are getting exported correctly and I am able to open the file But the application getting error message 'app.exe has stopped working' and closed automatically after few(2-3) minutes either if I closed that window or keep the application idle. 

 

This issue is not happening If I run the application from source. Occurs only If I run from exe.  I have added the application exe folder 'Sybase.PowerBuilder.DataWindow.Excel12.dll'.

 

 

 

Danish Ahamed LiakathAli Accepted Answer Pending Moderation
  1. Thursday, 3 September 2020 14:38 PM UTC
  2. PowerBuilder
  3. # 1

Does the dll need to register in each user machine ?  The issue occurs only If I use GetFileSaveName () and then export. If I  try only dw_grid.SaveAs() , I am not getting that error in my source. 

Comment
  1. Roland Smith
  2. Thursday, 3 September 2020 17:01 PM UTC
Sybase.PowerBuilder.DataWindow.Excel12.dll is a .Net library so must be installed into the GAC on every client machine.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 3 September 2020 14:22 PM UTC
  2. PowerBuilder
  3. # 2

This sounds like the issue I had. Sybase.PowerBuilder.DataWindow.Excel12.dll must be installed into the GAC.

Comment
There are no comments made yet.
Danish Ahamed LiakathAli Accepted Answer Pending Moderation
  1. Thursday, 3 September 2020 04:02 AM UTC
  2. PowerBuilder
  3. # 3

The SaveAs DW code written in the NVO base object. I though the base object may create the issue, So created a command button in the few windows as Export Data and copied the same SaveAs code under that button. Tried exporting from source works fine but after Build&Deployed getting the same issue. Application getting closed after 1.5mins. 

 

The below code that we are using to export the DWO.

 

IF GetFileSaveName( "Save Data In File", ls_Path, ls_File, "XLS", "Excel (*.XLS),*.xls,ExcelX (*.xlsx),*.xlsx,Text (*.txt),*.txt,CSV (*.csv),*.csv" ) = 1 THEN
IF f_msg_yn( "Save Data", "Save data with headers?" ) = 1 THEN
lb_Hdr = TRUE
ELSE
lb_Hdr = FALSE
END IF
CHOOSE CASE Right( ls_Path, 3 )
CASE "csv"
dw_grid.SaveAs( ls_Path, CSV!, lb_Hdr )
CASE "txt"
dw_grid.SaveAs( ls_Path, Text!, lb_Hdr )
CASE "xls"
dw_grid.SaveAs( ls_Path, Excel!, lb_Hdr )
CASE "lsx"
dw_grid.SaveAs( ls_Path, XLSX!, lb_Hdr )
CASE ELSE
END CHOOSE
END IF

Comment
There are no comments made yet.
Danish Ahamed LiakathAli Accepted Answer Pending Moderation
  1. Thursday, 3 September 2020 01:15 AM UTC
  2. PowerBuilder
  3. # 4

Hi Chris,

           I tried the exe Run As Administrator it didn't worked. I am working in Windows 7 OS and I tried with changing the 'Run this program in compatibility mode for' - select Windows 7 in the dropdown and   this option also didn't worked.

 The Application close after 2mins after exporting the file.

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 3 September 2020 11:14 AM UTC
If you build a simple test App EXE with that same DWO, retrieve the same data and then export to XLSX ....does it work?

Have you tried registering the "Sybase.PowerBuilder.DataWindow.Excel12.dll" in the GAC on the deployment PC as another test?

  1. Helpful
  1. Danish Ahamed LiakathAli
  2. Tuesday, 8 September 2020 21:01 PM UTC
Hi Chris,

yes I tried the simple test app and the same code works fine. I registered the"Sybase.PowerBuilder.DataWindow.Excel12.dll" in the GAC but it didn't work. Still facing the same issue.



Below error log details from event viewer.



Faulting application name: drams.exe, version: 3.0.0.0, time stamp: 0x5f1452da

Faulting module name: KERNELBASE.dll, version: 6.1.7601.24545, time stamp: 0x5e0eb7f5

Exception code: 0xebf00baa

Fault offset: 0x0000c5af

Faulting process id: 0x3e84

Faulting application start time: 0x01d6860b86a922d4

Faulting application path: C:\Program Files\ACS\DRAMSV2\drams.exe

Faulting module path: C:\windows\syswow64\KERNELBASE.dll

Report Id: 1dda9c14-f1ff-11ea-9299-90784138fadf
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 9 September 2020 00:54 AM UTC
If the "Simple Test App" works fine as you stated ... then I would look at other DC events PowerScript code.

If reviewing the existing code is complex - then an easy trick that I do is comment out all the DC/DS code (or over-ride the ancestor's code) until it works. Then uncomment each event code / over-ride back one script at a time, until it crashes. Then in that code block would most likely be the issue.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 2 September 2020 21:15 PM UTC
  2. PowerBuilder
  3. # 5

Hi Danish;

  Have you tried using the W10 "troubleshoot compatibility" check on the EXE to see what it recommends (Windows compatibility wise)?

  Also, have you tried running the EXE "as Admin"?

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.