117
Views
8
Comments
How can I call a stored procedure that is a server action
Question
Application Type
Reactive
Service Studio Version
11.54.54 (Build 63219)

Working on a private project and wondering how I can call a stored procedure that has been added as a Server Action in my Logic tab. 

So far I've dragged in a SQL widget but when attempting to execute the stored procedure I'm just getting errors saying the stored procedure does not exist. Am I doing something wrong?

2024-03-22 09-17-23
Chandra Vikas Sharma

Hi Akeem,

can you share the OML file or SQL widget  code which you written for call the stored procedure.

Thanks

CV


UserImage.jpg
Akeem Heshimu

I can't share the exact SQL code but I can provide an example below of what it looks like:


EXECUTE [somename_s_p] [{SomeTable}.[SomeRow]]]

SELECT @appID 


I get errors coming back saying the stored procedure cannot be found

UserImage.jpg
Akeem Heshimu

Thank you Daniel but I've tried these resources already and it won't be of use to me, the higher ups don't want to use any high code in the application aka (RunTimePublicDB.API) and I can't write any .NET code either. I'm simply trying to call a stored procedure into my OutSystems but the stored procedure is coming up as a server action and I'm not sure exactly where to go next.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

The link on my second bullet is a sample app of what is described on my link in the third bullet, it does NOT require you to write C# code. Furthermore it is the sample code and description on how to do it by number# Forge component creator and OutSystems employee.  Reconsider this approach one more time...

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Akeem,

Did the replies help you calling the Stored Procedure?

Regards,

Daniel

UserImage.jpg
Akeem Heshimu

Unfortunately, no it didn't. I'm getting errors back saying that it cannot find the stored procedure.

2019-01-07 16-04-16
Siya
 
MVP

When executing a stored procedure, have you provided the 'Logical Database' hint? For example:

eg: /* %LogicalDatabase%=GetLogicalDatabase({Customer}) */

This hint informs the platform which database connection to utilize for executing your stored procedure. In this instance, we're directing the platform to employ the same database connection configured for the customer table. Please note that Customer table is from the external database you have imported using integration studio.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.