- Pam Koch
- PowerBuilder
- Tuesday, 20 April 2021 06:41 PM UTC
Is it possible to create a dynamic datastore, with a stored procedure as the data source, without executing the stored procedure twice?
Given the below code, the stored procedure executes once for the SyntaxfromSQL and once for the retrieve.
ls_sp = "execute " + <stored procedure name with parameters>
ls_dwsyntax = SQLCA.SyntaxFromSQL(ls_sp, "", ps_errors)
ps_datastore.Create(ls_dwsyntax, ps_errors)
ps_datastore.SetTransObject(ps_sqlca)
ll_retrieve = ps_datastore.retrieve()
We are trying to avoid creating a datawindow each time we need to run a stored procedure to retrieve data, as we only use stored procedures instead of SQL selects.
Thanks.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.