Embedded SQL result issues inside %ZLANGC routine
Hello Community,
I executed the below query in the %ZLANGC00.mac routine. It returns results when using dynamic SQL, but not with embedded SQL(returns 0).
&SQL(SELECTcount(*) INTO :Cnt FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'")
Write "SQLTablecount : "_Cnt,!
Set tResultSet = ##class(%SQL.Statement).%ExecDirect(,"SELECTcount(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'")
Do tResultSet.%Display()Thanks!
Product version: IRIS 2024.1
$ZV: IRIS for Windows (x86-64) 2024.1.1 (Build 347U) Thu Jul 18 2024 17:40:10 EDT
Discussion (4)0
Comments
Can't reproduce in IRIS for Windows (x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:16:40 EDT:
.png)
But can reproduce on IRIS for Windows (x86-64) 2025.1 (Build 223U) Tue Mar 11 2025 18:14:42 EDT
.png)
Please file a WRC. Looks like something changed between 2022.1 and 2024.1.1
Thanks @Eduard Lebedyuk
Sure will create WRC.
This issue was introduced in 2024.1.0. I corrected it today. Thank you for reporting it.
Thank you for the quick resolution and the update. Glad to hear it's been addressed!