1. Ian Wells
  2. PowerBuilder
  3. Monday, 13 November 2023 20:32 PM UTC

This is related to an issue I raised a while back about the Tabbed UI. This was a problem in the PFC library which was fixed very quickly (thanks again)

Here is a link to that problem https://community.appeon.com/index.php/qna/q-a/tabbed-view-gives-unknown-control-mditbb-1-error

The issue I am having now is that, even though it works when I run my app in development mode i.e. from the IDE, after creating an executable, and using an install of the Runtime libraries where I checked the TabbedView Support:

 

When I start my executable a window flashes on the screen and then is closes. I managed to capture the error:

 

Looking at this line of script this is where I open my frame window:

Again, I don't get this error when I am running via the PBLs.

TIA for your help

 

Bruce Armstrong Accepted Answer Pending Moderation
  1. Wednesday, 6 December 2023 05:20 AM UTC
  2. PowerBuilder
  3. # 1

Whenever you have an application that fails at runtime but not in the IDE you can run the application with a /PBDEBUG command line argument and the application will start logging out everything it's doing.  Note that the application will run *much* slower as a result.  When the application crashes, you can check the last few lines of the file and get some idea what was going on when it crashed.

If you can create a small sample application that causes the same behavior on attach it on an issue or discussion on the Open Source PFC repo I can take a look at it.  I'm trying to create one of my own to see if I can replicate the behavior.  That's only something i can do in what little free time I have and it's not guaranteed that I'm going to be able to reproduce the problem.

Comment
  1. Ian Wells
  2. Wednesday, 6 December 2023 14:04 PM UTC
Thanks Bruce for replying to this. A weird thing happened. I rebuilt the executable just in case and copied it to a folder where the runtime libraries are installed. I double-clicked on the exe to replicate the problem and I got a pop-up from my virus software (McAfee) that the exe had been quarantined. I copied the exe again and tried a 2nd time - same Mcafee pop-up. I removed McAfee (old expired bloatware that came with a new PC). When I run the exe now it worked. No immediate shutdown, works fine, tabs and all!



Not sure what is going on that Mcafee would think my exe is a virus!



I will send the exe to one of my clients (who had the same symptoms: i.e. exe just shutting down immediately) to see what they get.



Very weird.



Thanks again.
  1. Helpful
There are no comments made yet.
Ian Wells Accepted Answer Pending Moderation
  1. Thursday, 16 November 2023 02:23 AM UTC
  2. PowerBuilder
  3. # 2

I've solved the SQL error at least. For some reason, and this is making me think I didn't get the latest PBLs from github - if anyone can tell me how to get the latest PFC PBLs LMK, anyway in this data window:

d_pfcsecurity_controllist

The where clause had double quotes around the table and column names like this:

 

 

Old SQL Syntax:

 

 

So, I removed them.

New SQL Syntax:

 

That solved my SQL error.

 

...but with Tabbed UI on, in the executable only, I get a window flash up and then the app crashes.

Back to MDI Open Sheets :-(

 

Comment
  1. Bruce Armstrong
  2. Wednesday, 6 December 2023 05:15 AM UTC
What database are you using? I tested those using both SQL Anywhere (via ODBC) and SQL Server ( via ADO.net ) and they work fine.



The latest PBLs are on the releases tab of the project. https://github.com/OpenSourcePFCLibraries/2022/releases



Note that there have been some changes since the most recent release was put together. it's probably best to do a Connect To Workspace and access the project directly if you want all the latest changes.
  1. Helpful 1
There are no comments made yet.
Ian Wells Accepted Answer Pending Moderation
  1. Wednesday, 15 November 2023 03:04 AM UTC
  2. PowerBuilder
  3. # 3

Yes. When I put the previous versions of the PFC PBLs back into my library list, full build and run my app I don’t get the SQL error above, but I get the problem with the tabbed dialog (only in the exe)

I think I’m just going to give up trying to use the tabbed UI functionality in my app. It works fine if I use the PBLs I manually changed to match the changes that Bruce made to the ones in GitHub. It just doesn’t work in the executable. 

Going back to plain old MDI UI :-(

Thanks for your help though Chris. Maybe if I ever start a new PB project I will start with your framework. 

Thx again. 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 15 November 2023 03:28 AM UTC
I get the sneaky suspicion that the security table was changed between the version of the PFC that your App is using vs the current 2022 PFC. So that table probably needs to be refactored a bit to match the newer Schema definition & it's DML being used. But either way, it's a PIA. I feel your pain. :-(
  1. Helpful
There are no comments made yet.
Ian Wells Accepted Answer Pending Moderation
  1. Tuesday, 14 November 2023 23:59 PM UTC
  2. PowerBuilder
  3. # 4

Chris

Looks like something is going wrong in some call to check security:

 

(0FE07008): SELECT security_info.window , security_info.control , security_info.status , security_users.priority FROM security_info , security_users WHERE ( security_users.name = security_info.user_name ) and ( "security_info"."window" = ? ) and ( "security_info"."user_name" = ? ) and ( "security_info"."application" = ? ) ORDER BY security_info.control ASC, security_users.priority ASC
(0FE07008): VCHAR Length=17 ID=:winname *w_aims_asset_list*
(0FE07008): VCHAR Length=6 ID=:username *iwells*
(0FE07008): VCHAR Length=4 ID=:appname *aims* (5.142 MS / 37.499 MS)
(0FE07008): BIND SELECT OUTPUT BUFFER (DataWindow): (0.007 MS / 37.506 MS)
(0FE07008): ,len=65,type=CHAR,pbt=1,dbt=0,ct=0,prec=0,scale=0
(0FE07008): ,len=129,type=CHAR,pbt=1,dbt=0,ct=0,prec=0,scale=0
(0FE07008): ,len=2,type=CHAR,pbt=1,dbt=0,ct=0,prec=0,scale=0
(0FE07008): ,len=80,type=LONG,pbt=22,dbt=0,ct=0,prec=0,scale=0
(0FE07008): EXECUTE: (1.021 MS / 38.527 MS)
(0FE07008): *** ERROR 102 ***(rc -1) : SQLSTATE = 37000
[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near 'window'.
(0FE07008): CANCEL: (0.026 MS / 38.553 MS)
(0FE07008): COMMIT: (0.022 MS / 38.575 MS)

 

In the pre-open event of all my windows I have this script and it seems like this is the culprit.

 

 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 15 November 2023 02:07 AM UTC
Is the PFC "Security" table all properly set-up in your database?
  1. Helpful
There are no comments made yet.
Ian Wells Accepted Answer Pending Moderation
  1. Tuesday, 14 November 2023 22:09 PM UTC
  2. PowerBuilder
  3. # 5

Just to make sure I made all the manual changes correctly to my code based upon Bruce's updates, instead I downloaded the 2022 PFC versions from github and compiled my code with these new PFC pbls. No errors

When I run my code now I get this popup every time I open any window. THis is with the tabbed UI on or off:

 

After getting the error the app still works and opens the windows.

I feel I have broken something bad.

Any help would be greatly appreciated.

 

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 14 November 2023 22:33 PM UTC
Hi Ian;

That looks better than the App Manager error for sure!

What you have now is a SQL processing issue.

Try setting your PB App's SQLCA to trace the SQL ...

ie: SQLCA.DBMS = "TRACE ODB"

Then, let;'s see what SS is trying to process when that error occurs.

HTH

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 14 November 2023 15:40 PM UTC
  2. PowerBuilder
  3. # 6

Hi Ian;

  Are yo using the 2022 PFC version with your PB 2022 App?

FYI: https://github.com/OpenSourcePFCLibraries

Regards ... Chris

Comment
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.