1. Scott Gorke
  2. PowerBuilder
  3. Wednesday, 14 October 2020 20:44 PM UTC

We just converted (Finally) a PB 12.1 application to PB 2019 R2 (build 2328). It works mostly but for one flaw in the compiled code - we store email templates via user settings in an RTE, in SQL server "text" columns.

When we run the app within PB 2019, it properly pulls the RTE and locates the user-selected fields therein, populating a table with new data. When we run in a compile (using PowerGen as the compiler), it doesn't do that.

The code fragment below deletes the contents of the datastore, and repopulates it based on the number of \txfielddef's in the RTE, then saves the new contents of the datastore. For some reason, in the compile, only the delete occurs.

I'm thinking that the compile is missing a DLL or several. Which ones do we need to bundle in the install package to get this to work like it does within PB? Or is there more to this?

Any help is appreciated. Reach out if you'd like clarification.

Code fragment:

 

// First, delete all in the fields datastore.
ids_email_fields.RowsMove(1, ids_email_fields.Rowcount(), Primary!, ids_email_fields, 1, Delete!)

// Count the number of fields in the passed RTE "arte".
ls_doc  = arte.copyrtf( false )
li_flds = 0
li_pos  = 0

// Check for "{\txfielddef" ending in either "{" or "\". (When I run through PB's debugger, this works; this might be the culprit in the compile? Because in the compile
do while 1 = 1
    li_pos = pos( ls_doc, '{\txfielddef{', li_pos + 1 )
    if li_pos = 0 then exit
    li_flds ++
loop

li_pos  = 0
do while 1 = 1        
    li_pos = pos( ls_doc, '{\txfielddef\', li_pos + 1 )
    if li_pos = 0 then exit        
    li_flds ++        
loop

// If we find at least one, gather its pieces and insert into the datatstore.
if li_flds > 0 then
    ls_fld     = arte.inputfieldlocate( first! ) //Perhaps this is what's failing?
    i             = 1
    do while i <= li_flds
       
        ll_row = ids_email_fields.InsertRow(0)
        ids_email_fields.SetItem(ll_row, "urn", al_urn)
        //continue populating the row ll_row
        ls_fld = arte.inputfieldlocate( next! )
        i ++
    
    loop
end if

li_rc = ids_email_fields.Update()

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 15 October 2020 23:29 PM UTC
  2. PowerBuilder
  3. # Permalink

This is the full list of DLLs with build 2353, (not the same as you have which is 2328). I strongly recommend for you to upgrade your powerbuilder to build 2353 as it has an important fix for RTE:

(Bug 4577) Table information is missing in the generated .exe file, which makes the TX control fail in the runtime environment. See: https://docs.appeon.com/pb2019r2/release_bulletin_for_pb/Build-2353-MR-BugFixes.html#d0e1364

 

See the attached rteDLLs.txt file (within a ZIP file as we're not allowed to attach txt files), for a complete list of DLL's.

regards,

 

Attachments (1)
Comment
  1. Scott Gorke
  2. Wednesday, 21 October 2020 17:04 PM UTC
Hi Miguel,



It worked out. We installed build 2353, recompiled, and tested the compile, and it works as expected. Thanks for the tip!



Scott
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 21 October 2020 17:10 PM UTC
YW :)
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 14 October 2020 23:24 PM UTC
  2. PowerBuilder
  3. # 1

Hi Scott;

  • Are you compiling to 32 bit or a 64 bit App EXE?
  • Is your App EXE a P-Code or an M-Code compile?
  • Does the App EXE work OK on the development PC?
  • Does the App EXE work OK if compiled from the PB IDE?
  • What Windows O/S is the EXE deployed to?
  • Is the App EXE run under RDS or Critrix?

Regards ... Chris

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 15 October 2020 10:25 AM UTC
  2. PowerBuilder
  3. # 2

Hi,

Use the runtime packager to create an installer with only the rich text checked:

Then install the MSI into some temporary folder:

There's you'll have all the stuff needed for deployment of rich text (and other basic things).

Those are the files you have to copy to whichever files you distribute currently.

(don't forget to uninstall the msi you just installed)

regards

 

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 15 October 2020 10:30 AM UTC
  2. PowerBuilder
  3. # 3

These are basically the files (the ones "selected"), but as I said in previous answer it's better to create your msi and see for yourself what's missing in your current distribution (just overwrite them with all files, not just the selected ones).

 

 

Comment
  1. Scott Gorke
  2. Thursday, 15 October 2020 19:06 PM UTC
Hi Miguel, thanks for the suggestion. We added a couple DLLs that were missing from our install based on the screenshot you submitted, but the issue remains.
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 15 October 2020 23:10 PM UTC
Hi Scott,

The list was just for you to have an idea which files are involved. As I said, to get a full list, you would have to use the runtime packager.

Since you've specified your versions I'll post the complete list for you to check in a new answer.

regards.
  1. Helpful
There are no comments made yet.
Scott Gorke Accepted Answer Pending Moderation
  1. Thursday, 15 October 2020 16:36 PM UTC
  2. PowerBuilder
  3. # 4

Hi Chris and Miguel.

Chris, answers to your questions:
* 32 bit EXE
* I think it's P-code but I don't usually do the compiles (but I included a screenshot)
* not sure if EXE works on DEV PC - will try that
* never compiled from PB's IDE
* deployed to Win10
* run under RDS

Thanks,
Scott

[screenshot of PowerGen settings attached - we generate EXE and PBD files]

 

Comment
  1. Scott Gorke
  2. Thursday, 15 October 2020 19:04 PM UTC
UPDATE: EXE does NOT work on development laptop (but PB DOES work on same?).
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 15 October 2020 20:23 PM UTC
Hi Scott ... In your Application Object (in the App Painter) - did you set your App to use the TE control or the TX control for RTE processing support "under the covers"?
  1. Helpful
  1. Scott Gorke
  2. Thursday, 15 October 2020 20:34 PM UTC
Hi Chris, where is that setting in the app painter?
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 15 October 2020 20:40 PM UTC
  2. PowerBuilder
  3. # 5

Hi Scott;

  TX/TE selection ....

 

HTH - Regards ... Chris

Comment
  1. Scott Gorke
  2. Thursday, 15 October 2020 20:49 PM UTC
Ah, the properties. Never looked there before!

Our app is using Built-in TX text control.

Thanks....
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 19 October 2020 15:08 PM UTC
Hi Scott ... that is great as that was the default RTE engine "under the hood" in PB 12.1. However, the Appeon PB TX control might be a bit newer. However, it should work the same.

FWIW: For SS TEXT column data, make sure that you change the 32K default data stream size in your DB connection to a value that can handle very large RTE data streams. Otherwise, the RTE template could get truncated.
  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.