I am running PB 2019 R2 build 2353. I currently use MS SQL Server. I am in the process of converting to MySQL version 8.0.21. I am able to connect to the database no problem using ODBC drivers. I converted one of the simpler applications and it connects and opens no problem. However this simple SQL statement generates the following error.
SQLSTATE = 37000
[MySQL][ODBC 8.0(a) Driver][mysqld-8.0.21]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) from person where pid =?' at line 1
The SQL statement is
select count(*)
into :i
from person
where pid = :ll_person
;
The problem seems to be the into :i
I am unable to find anything about this issue on the web. Any help would be appreciated.
Thank you,
Exact ?
Correct, embedded SQL is at the mercy of the PB developer.
However, if DWO's use a "PBSELECT" (aka use graphic mode) in their SQL Painter, then they will *dynamically* align their SQL at run-time to the DBMS that they find active when the SetTransObject() command is executed.
HTH
Regards ... Chris
PowerBuilder is an awesome tool, and when used with ANSI code and PBSELECT allows database switching very easily.