1. Michael Connell
  2. PowerBuilder
  3. Friday, 2 December 2022 08:26 AM UTC

Hi,

Our PowerBuilder 2021 application is returning random characters when creating a DataWindow dynamically via the Create method fails.

The DW syntax is pulled from a database and in some instances refers to a table or view that doesn't exist. When this happens the Create method of course fails, but instead of returning an error message it  returns what looks like Chinese (but which I'm assured by a Chinese colleague is NOT Chinese):

The message returned is displayed to the user, but this is of no use in it's current form.

Is this a bug and if so is there a workaround / fix?

Regards,

Michael Connell.

 

Michael Connell Accepted Answer Pending Moderation
  1. Friday, 2 December 2022 13:56 PM UTC
  2. PowerBuilder
  3. # 1

Chris,

 

I initially thought that the application was checking the return code from SyntaxFromSQL, yes. However when I investigated further I see that this is not the case.

The original client server application has been converted to a PB front-end with a C# back-end and it seems that the API call to the back-end which should return the DW syntax is not returning a "table or view does not exist" error and is in fact returning an empty string as the syntax.

The strange characters are thus the result of calling the Create method with an empty string.

If I run the original unconverted application, the error from SyntaxFromSQL is picked up (and displayed to the user) before the Create method is called.

My mistake was assuming that the C# back-end was working correctly.

Thank you for pointing me in the right direction.

Problem solved!

Regards,

Michael Connell.

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 2 December 2022 16:17 PM UTC
Please mark correct answer and resolved, thanks!
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 2 December 2022 18:29 PM UTC
Hi Michael;

That is awesome news ... thanks for the feedback!

I am so glad that your issue is now resolved and the users no longer need to lean Mandarin: ;-)

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 2 December 2022 13:12 PM UTC
  2. PowerBuilder
  3. # 2

Hi Michael;

  Is your PB App checking both the  SyntaxFromSQL return code and error argument for a failed DWO source generation?

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.