1. Martin Lopez
  2. PowerBuilder
  3. Friday, 18 August 2017 19:46 PM UTC

I am new to PowerBuilder and I'm currently taking the Appeon-U Fundamental Course with PowerBuilder 2017. I am connected to the PB Demo DB V2017 database that comes with the installation. I am able to connect successfully and view as well as modify the tables through the database painter. However, when I try to open the Procedures & Functions folder I get the error:

SQLSTATE = 37000
[SAP][ODBC Driver][SQL Anywhere]Syntax error near
'PROCEDURE_OWNER' on line 1

How do I go about troubleshooting this? Thanks.

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 18 August 2017 20:29 PM UTC
  2. PowerBuilder
  3. # 1

Hi Martin;

         This is actually a bug in SQL Anywhere version 17 build 17.0.4.2053 - which is the current free "developer" version from SAP. The SP problem has been fixed since SA build - #2088. Here is the SAP notice ...

================(Build #2088  - Engineering Case #799815)================

        The 17.0 SQL Anywhere database server has made PROCEDURE_OWNER a reserved

        word. For 17.0.0, the ODBC driver was changed to adapt to this new feature.

        As of build 2000, the query used by the driver for the ODBC 2.0 version of

        SQLProcedures did not quote the column name PROCEDURE_OWNER resulting in

        a syntax error. Any ODBC application that used SQLProcedures and runs in

        ODBC 2.0 mode will fail.

       

        For example, this problem will cause ADO applications that use MSDASQL (the

        ODBC driver interface) which operates in ODBC 2.0 mode to fail. The following

        sample VBScript code illustrates the problem:

        command.CommandText = “sp_proc”

        command.CommandType = adCmdStoredProc

        command.Prepared = True

        WScript.Echo "Parameters Count: " & command.Parameters.Count

       

        If the stored procedure sp_proc has 3 parameters, the Parameters.Count value

        returned was 0, not 3 as it should. ADO did not indicate that an error has

        occurred.

       

        This problem has been fixed.

 

        A work-around until the corrected version can be installed is to use a 17.0

        ODBC driver prior to build 2000.

 

 

   If you have an SAP SA support plan, you can just upgrade to a newer build (2088 or higher) and the SP issue should be resolved. If you are only using the free SA v17 developer edition and have no support plan - then, I would recommend dropping back to the free SA 16 developer version. SA v16 SP's work great with PB 2017!

 

HTH

Regards ... Chris

Comment
  1. Martin Lopez
  2. Friday, 18 August 2017 21:06 PM UTC
Chris,



Thank you very much for providing this information. That is the exact version that I have so I will try to upgrade.



Thanks,

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