· Sep 21, 2021

&sql(sql query ) not executing in Extended Business Componets Classes

Hi Community

I have extended my operation class from Ens.BusinessOperation class . I want to execute below sql on cache.

&sql(Select demoVersion into :DemoVersion from demointerface.DemoInstances where ID=:demoID)

this line not even giving error.

Please suggest me how to make sure my sql query should work everytime , when i call the class method

Same code is working fine in production but not working in local:(

Thanks a lot

Prashanth Ponugoti

Product version: IRIS 2020.1
$ZV: HS-2020.1
Discussion (8)1
Log in or sign up to continue

so you can call the local  commandline ( session  or terminal) and run
your SELECT in SQL shell [  do $system.SQL.Shell() ]
or from SMP System->Explorer->SQL  to see if there is any content.

If there is some content you may try next to use variables from the global scope
for your  embeded SQL
instead of 
&sql(Select demoVersion into :DemoVersion from demointerface.DemoInstances where ID=:demoID)

try it with
&sql(Select demoVersion into :%DemoVersion from demointerface.DemoInstances where ID=:%demoID)