1. Aron Cox
  2. PowerBuilder
  3. Thursday, 15 November 2018 17:28 PM UTC

PowerBuilder 2107 R2 1769

Windows 10

Building 32-bit application with PBDs

 

I've seen this type of issue come up regularly, but I can't find anything that sounds like a solution to my current woes.

Here's what's happening:

Have a 12.5.2 application that was working just fine, we deploy by copying the application,  and adding the PBDK files to a folder in the path. We've been doing this for years no problem, including exporting to Excel 12 with SaveAs XLSX!.

We have upgraded to PB2017, and added all the new PBDK files to the same folder as always, including the two required for exporting to Excel:

      PBDWExcel12Interop170.dll and Sybase.PowerBuilder.DataWindow.Excel12.dll

However on user PCs the SaveAs XLSX! completely crashes our application, no errors or anything just gone.

If we install the full PowerBuilder Deployment Kit using the MSI file from the PowerBuilder Runtime Packager, then the user starts working again.

Do we need to do something with the two Excel handling dlls other than copy them? I don't remember having to do anything else in the past but perhaps I've forgotten. I've seen mention of the GAC, but I've never had to do that before.

Thank you :)

Aron Cox Accepted Answer Pending Moderation
  1. Friday, 16 November 2018 14:26 PM UTC
  2. PowerBuilder
  3. # 1

I found the answer to the problem.

We don't need to install Sybase.PowerBuilder.DataWindow.dll to the GAC, we can just include it next to the exe file that uses it. However it was updated in PB 2017, and we had missed out replacing the PB 12.5 version with the updated PB 2017 dll. Once we did that all started to work again. It would be nice if this file was version by name like all the other dlls in PowerBuilder, as that would have made it a little more obvious!

One thing to note is, because the file name is the same you can;t put this file into a shared folder e.g. PBDK or COMMON or System32 as if you then ran two PowerBuilder applications, one for PB 12.5 and one for PB 2017, then one of them wouldn't work properly. I guess that's why it's supposed to go in the GAC as that would then handle all that stuff automatically.

Comment
  1. Chris Pollach @Appeon
  2. Friday, 16 November 2018 15:41 PM UTC
Hi Aron;

FYI: Yes, DLL's in the GAC are versioned ... for example:



Sybase.PowerBuilder.Common, Version=11.5.0.0, Culture=neutral, PublicKeyToken=b76b10796def6a00, processorArchitecture=x86

Sybase.PowerBuilder.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=598c7456a83d557a, processorArchitecture=x86

Sybase.PowerBuilder.Common, Version=17.0.0.0, Culture=neutral, PublicKeyToken=a12eb91176fc5320, processorArchitecture=x86



Regards ... Chris
  1. Helpful
There are no comments made yet.
Aron Cox Accepted Answer Pending Moderation
  1. Friday, 16 November 2018 08:43 AM UTC
  2. PowerBuilder
  3. # 2

Thanks for the suggestions. I don't remember ever having to do anything with the GAC to get things working, but I shall trawl though our installation code. I'll post my results here.

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Friday, 16 November 2018 04:20 AM UTC
  2. PowerBuilder
  3. # 3
How do I add and remove assembly from GAC?
 
Simply copy the dll files from the installation directory to C:\WINDOWS\assembly. This is equivalent to running the gacutil.exe utility. To remove the assemblies, open C:\WINDOWS\assembly and select the assemblies you want removed. Press DELETE on the keyboard.
Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 15 November 2018 19:24 PM UTC
  2. PowerBuilder
  3. # 4

Sybase.PowerBuilder.DataWindow.Excel12.dll is supposed to be installed the GAC according to this very old post from Chris. I'm not sure how to do that.

http://chrispollach.sys-con.com/node/964686/mobile

 

Comment
  1. Chris Pollach @Appeon
  2. Friday, 16 November 2018 14:28 PM UTC
Hi Roland;

That is 100% correct. Its normally not an issue when using the PB Packager utility to create a MSI install file for the PB run-time. The MSI will automatically register the "Sybase.PowerBuilder.DataWindow.Excel12.dll" in the GAC for you. In fact, there are other DLL's that need to be in the GAC as well for proper .Net InterOp to occur (depending on what PB features your App is using).

The problem occurs when developers think that they can just manually copy the DLL's from the PB "Shared" area to the target deployment PC. This is where the GAC issue starts. Of course, that's not a problem if you manually plan to use the GAC utility to register the appropriate DLL's on the target PC.

To get an idea what PB DLL's are in the GAC, you can use the following command ... for example:

gacutil -l >yourassemblies.txt

Now open the created text file and search for any DLL starting with "Sybase.PowerBuilder.xxxx". Some of these need to be replicated on the target PC where the "Version=" the PB version you are using. For that, refer to the PB Help file under the keyword search "Deployment".

HTH

Regards ... Chris

  1. Helpful
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.