1. Markus Schröder
  2. PowerBuilder
  3. Wednesday, 7 April 2021 09:59 AM UTC

Hello,

when i do a full build of my workspace, Powerbuilder sends the embedded sql commands to the database.

Does Powerbuilder display incorrect sql statements anywhere? (in a postgres database i can see the incorrect statemants in a database logfile)

Thanks for a hint

 

Markus Schröder Accepted Answer Pending Moderation
  1. Thursday, 8 April 2021 05:30 AM UTC
  2. PowerBuilder
  3. # 1

Hello Chris,

thanks for your response.

If I compile a single script, Powerbuilder highlights the DML error.
But I don't get any DML errors in the Error Pane of the IDE when I do a full build, although there are some (Powerbuilder would then also have to display many errors if it was connected to the wrong database).

Is there an option in the IDE to enable this behaviour? ("Disable database connection when compiling and building" in the system options is not checked).

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 8 April 2021 16:34 PM UTC
Seems like PostGreSQL then might not be sending back the DML compiler's parse result(s) back too the PB IDE. I wonder if you turn on SQL Tracing in the IDE and do a compile, if these DML errors appear in the SQL Trace's log file? If so, maybe the IDE or ODBC driver is just not picking these up from that compile result set or if not present, we have a PostGreSQL DBMS DML Compiler issue.

BTW: What version of PG are you using?
  1. Helpful
  1. Markus Schröder
  2. Friday, 9 April 2021 07:09 AM UTC
We are using Posgres 12.1, but the problem also occurs in Oracle projects.

I wonder if the output of the DML errors in the Powerbuilder error pane works in principle. I have been working with powerbuilder for over 20 years but have never seen this output.

Perhaps i missed a setting in the PB IDE.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 7 April 2021 19:33 PM UTC
  2. PowerBuilder
  3. # 2

Hi Samuel;

  Yes, all inline DML is sent to the current DBMS connection with a "No Execute" flag set. This forces the DML compiler on the DBMS side to check (parse only) each of your SQL statements and return an "OK / Not OK" back to the IDE. If the PB IDE compiler receives a bad SQL return code from the DML compiler, it will flag these in the Error Pane of the IDE. Also, if your compiling an active PowerScript using the Compile+L command, the PowerScript Painter will highlight the erroneous SQL statement(s).

  You can set the IDE to ignore the SQL at compile / save time. If that setting is active, then no DML errors would appear. Only at PB App runtime if an specific DML error was encountered.

HTH

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.