Hi Clayton,
Since it's hard to detect where something might have gone wrong, let me guide you through the process of creating a stored procedure and executing it.
1 - To start off, open SQL Server Management Studio, or a similar program, in order to login to the database.
2 - Login to (local)\OUTSYSTEMS using Windows Authentication
3 - Click on the "outsystems" database, under "Databases"
4 - Right-click on it, and select "New Query"
5 - Execute the following query:
use outsystems;
go
create procedure test1
as
select name from ossys_espace
go
exec test1
6 - Now your stored procedure should show up on the tree, under outsystems > Programmability > Stored Procedures
7 - Right-click the stored procedure, and click "Properties"
8 - Click the "Permissions" option, and then the "Search..." button on the right side.
9 - Type OSRuntime and click on "Check Names"
10 - Click Ok
11 - Check the "Grant" checkbox, on the "Execute" line, to give him execution permissions.
11 - Now, on your eSpace, create an advanced query, and just type
exec test1
12 - You need to have an output structure, with a text field. I've attached a sample eSpace where this works, you just need to publish it, and test the query in Service Studio!
I hope this helps. Let me know if this solves your problem, or if you have other questions.
Regards,
Paulo Tavares