1. Olan Knight
  2. PowerBuilder
  3. Thursday, 3 June 2021 19:49 PM UTC

PowerBuilder 12.1, b7055
PowerBuilder 2019R3, b2703

Summary
I need a way to pass PowerBuilder data from one PB app to another, separate PB app.

Details
I discovered that our invoice production process was literally 5 times slower in PB2019R3 than in PB12.1. This is a show stopper, but I may have found a way to move forward.

I want to extract the invoice production process from the application and create a new and separate PBv12.1 application that does nothing but take data from the main app, do the processing, and return to the PB2019R3 main app.

To facilitate that, I need a BUNCH of data from the main app. How do we pass bunches of data around? With a structure, of course! I just started and this is what I need so far:


Sadly, the only link between the main app and the new exe is "commandline".

I can use FindWindowW (main_app)  and get a handle to the main app, , but I don't know how to access internal data - strings, longs, DWs, and so on. I'm not sure if that's even possible.

For a DW I san SAVEAS an Excel file then import it into a copy of the dw in the new app, and I can do that for all of the required data in a similar manner, but....blech. I'[d rather be able to use dot notationi and reference the main_app internals.

Can this be done? If so, how?


Thank You!

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 3 June 2021 19:59 PM UTC
  2. PowerBuilder
  3. # 1

Hi Olan;

  Here is one suggestion ...

http://chrispollach.blogspot.com/2019/12/socket.html

HTH

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Friday, 4 June 2021 15:47 PM UTC
Hi Olan;

Suggestion .... If you create an external DWO with the exact same columns as the Structure - then you can copy the values from the structure to the DWO in one command, for example:

DS/DC.object.data = <myStructure>

Then you can use the GetFullState() command for TCP/IP processing to get the DWO from AppA to AppB. AppB can then either deal with the DWO via a SetFullState() directly or after that populate the local structure from the DWO buffer, as follows:

<myStructure> = DS/DC.object.data

Tip: Use an array of the structure for passing multiple DWO rows.

Food for thought! ;-)

Regards ... Chris

  1. Helpful
  1. Olan Knight
  2. Friday, 4 June 2021 18:06 PM UTC
OK...that's slick! :) Thanks for the tip!
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 4 June 2021 18:48 PM UTC
You can also build any complementary structure automatically from any DW object source ...

http://chrispollach.blogspot.com/2015/05/wssg.html

The latest version of the structure generator is here: http://chrispollach.blogspot.com/2021/05/2021r2apps.html

(See item #3)

  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 4 June 2021 14:21 PM UTC
  2. PowerBuilder
  3. # 2

I have a Winsock example:

https://www.topwizprogramming.com/freecode_winsock.html

 

Or on the Tools page is a PBNI implementation of Winsock.

Comment
  1. Olan Knight
  2. Friday, 4 June 2021 18:07 PM UTC
Lovely! Thank you, Roland!

  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.