1. Kevin Geist
  2. PowerBuilder
  3. Wednesday, 4 August 2021 13:29 PM UTC

When I do CTRL L to verify my event code, I get errors that indicates  MSOLEDBSQL throws a SqlState 42000 OLE DB Driver for SQLServer Incorrect syntax near 'xxx'

Yet, when I run this code connecting to this database, the code works, the imbedded sql works.  What suggestions do you have to fix this issue?  

 

   

Accepted Answer
Kevin Geist Accepted Answer Pending Moderation
  1. Wednesday, 4 August 2021 15:04 PM UTC
  2. PowerBuilder
  3. # Permalink

My database used in this profile in my IDE is the same database that is used in the code when I run or debug the app.  Below is the proof.  However, there is a change I made on the settings on the syntax tab that added the DelimitIdentifier setting, which looks like the lack of it was the cause of the compile errors.     Thanks for pointing me in the right direction. 

 

Here you can see when I debug this code, it has already executed this UPDATE code that flags as having syntax errors, and there is no error returned when the code is run. 

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 4 August 2021 16:07 PM UTC
Thanks for sharing the solution!
  1. Helpful 1
  1. Gokul Kannan
  2. Monday, 2 October 2023 19:50 PM UTC
It helped alot Thank you
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 4 August 2021 14:35 PM UTC
  2. PowerBuilder
  3. # 1

Hi Kevin;

  Make sure that your IDE is connected to the same DB instance as the App is using.

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.