1. Robert Holoubek
  2. PowerBuilder
  3. Friday, 19 October 2018

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
0
Votes
Undo

 

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
Your welcome ... excellent news Robert! :-)
  1. Chris Pollach
  2. Wednesday, 24 October 2018
There are no comments made yet.
  1. Wednesday, 24 October 2018
  2. PowerBuilder
  3. # 1
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

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
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. Robert Holoubek
  2. Friday, 19 October 2018
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. Chris Pollach
  2. Friday, 19 October 2018
There are no comments made yet.
  1. Friday, 19 October 2018
  2. PowerBuilder
  3. # 2
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.