1. Robert Holoubek
  2. PowerBuilder
  3. Friday, 19 October 2018 14:33 PM UTC

Hello,

I migrated a project from PB 11.2 to 2017R3. Then I created .net assembly project, included several libraries containing NVOs and many datawindows and deploy it as a .net assembly.

When I add this new dll as a reference to another C# project built in Visual studio I'm able to call a method XYZ from NVO compiled in dll. So far it's ok.

The problem appears when I try to retrieve a datastore in my PB method XYZ. The dataobject is assigned dynamically from string. SetTransObject always returns -1 and retrieve() as well.

The same method XYZ called directly from PB application works fine.

It looks like the object of datawindow is not included or generated in .net assembly and therefore cannot be used. Am I wrong?

I read about planned feature of C# datastore in PB2018. Will it help in my case?

 

lds_data = create datastore
lds_data.DataObject = "d_data"

lds_data.SetTransObject(ltr_sqlcatran)

lds_data.retrieve()

 

 

Thank you

Robert

Robert Holoubek Accepted Answer Pending Moderation
  1. Wednesday, 24 October 2018 08:45 AM UTC
  2. PowerBuilder
  3. # 1

 

Great, finally I made it to work.

I don't need to create msi file because I'm trying it on my development machine. But PBD files generated together with .net assembly must be copied to any system path to be consumed externally.

Thank you Chris

 

 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 24 October 2018 13:13 PM UTC
Your welcome ... excellent news Robert! :-)
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 19 October 2018 14:51 PM UTC
  2. PowerBuilder
  3. # 2

Hi Robert;

  I suspect that your issue might be around the fact that the .Net Assembly target has DW's in a PBL that then also generated a PBD. Make sure that you deploy that .PBD file with your .Net Assembly for external consumption.

HTH

Regards... Chris

Comment
  1. Robert Holoubek
  2. Friday, 19 October 2018 16:13 PM UTC
Thank you Chris,

pbd libraries were generated to the same folder as .net dll assembly. What else should I do with them to "Make sure that you deploy that .PBD file with your .Net Assembly for external consumption."?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 19 October 2018 17:17 PM UTC
The other item is to make sure that you package is the PB .Net Run-time (not "C" run-time for PB native Apps) via the PB Packager utility. That will create an installation MSI file that must be run on the PC where you are deploying the .Net Assembly.
  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.