1. ATK Gimmy Susan
  2. PowerBuilder
  3. Monday, 1 June 2020 16:15 PM UTC

Hi community
Is there a way to export Datawindows to a PBL directly from the compiled EXE program (not from source ide)?

The idea is that the user personalizes (*) the datawindows and then save it on a pbl at the top of the list of libraries.

* Enlarge columns, hide columns, change fonts, change the format, etc.

 

thanks for the replies

Gimmy

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 1 June 2020 18:18 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Gimmy;

Step1:   You can load the DWO source at run time no matter how the PB App EXE was compiled ...

ls_dwo_source  = DC/DS.Describe ("DataWindow.Syntax")

Step2:   Now export the DWO source in the "ls_dwo_source" variable into file using an SRD file extension (via a FileWriteEx() command). Then import it into a PBL in your Apps library list via the LibraryImport() command.

     Tip: You can use the AddToLibraryList() command to "dynamically" add the PBL to the App's EXE run time libraries to be searched.

HTH

Regards ... Chris

Comment
  1. Olan Knight
  2. Wednesday, 3 June 2020 17:14 PM UTC
Just remember that the ADDTOLIBRARYLIST command dannot be run in the IDE, it's strictly a runtime function.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 1 June 2020 20:07 PM UTC
  2. PowerBuilder
  3. # 1

I have an app that shows how to do it. Go to this page and download DWFromPBD:

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

Just migrate the source code to your version of PB and create an EXE.

 

Comment
  1. ATK Gimmy Susan
  2. Monday, 1 June 2020 21:41 PM UTC
very helpful
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Monday, 1 June 2020 19:17 PM UTC
  2. PowerBuilder
  3. # 2

Hi Gimmy,

There was a session done on this topic at Elevate 2017.  It may be worthwhile to check out this presentation.

Best regards,
Armeen

Comment
  1. ATK Gimmy Susan
  2. Monday, 1 June 2020 19:27 PM UTC
Hi Mazda

Thank you for the link !



I don't have access to Elevate 201. Only 2018 and 2019
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Monday, 1 June 2020 19:47 PM UTC
The link I provided doesn't work for you?
  1. Helpful
  1. ATK Gimmy Susan
  2. Friday, 5 June 2020 08:27 AM UTC
yes, it works.

Only it, not all the elevate 2017 documkents.

=)
  1. Helpful
There are no comments made yet.
ATK Gimmy Susan Accepted Answer Pending Moderation
  1. Monday, 1 June 2020 18:26 PM UTC
  2. PowerBuilder
  3. # 3

Hi Chris
good news.

DC / DS.Describe ("DataWindow.Syntax") returns a string.

Do you suspect that there are problems with the length? (very complex datawindow)

 

Thanks

GMY

Comment
  1. Chris Pollach @Appeon
  2. Monday, 1 June 2020 18:57 PM UTC
Nope ... Appeon PB handles up to 2Gig of string data. Way beyond a large DWO source size in my experience. ;-)
  1. Helpful
  1. ATK Gimmy Susan
  2. Monday, 1 June 2020 21:45 PM UTC
I have tried and it works.



Two questions:

1) - Why did you suggest me to save the file with the extension srd? It is the same if I save in TXT. To import I have to read the file in TextMode !, it doesn't matter the extension



2) If I understand correctly. LibraryImport wants the sintax of the datawindow, not the file. So enough:

a) describe ("Datawindow.Syntax")

b) LibraryImport

(without going through files).



Thanks in advance for your reply
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 1 June 2020 22:50 PM UTC
1) Just in case you wanted to save a "cluster" of DWO's source.

2) Yes, you can bypass the file step if you do not want to save the DWO source. Just in case, I panted the idea of saving them externally as a "repository". ;-)

Of course, I'm leaving up to your needs to decide what you need.

Food for thought though. Save the DWO source in a BLOB table in your DB. Then (if you want) you would never need to deploy DWO source again AND and change to the DWO in the DB Table would be picked up dynamically.
  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.