Hello,
You can create a store procedure in your database within:
<your_database>/Programmability/Stored Procedures. To pass a parameter you need to place parameters to the array. An example for calling parameter could be this:
object[,] parameters = new object[1, 3];
parameters[0, 0] = "@SiteID";
parameters[0, 1] = "2";
//execute stored procedure
DataSet ds = gn.ExecuteQuery("Proc_CMS_Site_Select", parameters, CMS.IDataConnectionLibrary.QueryTypeEnum.StoredProcedure, false););
Then you would receive
DataSet object and you can databind the
DataSet to any listing web part like for example repeater web part.
If you do not need to execute stored procedure with some parameters you can create query in
CMS Site Manager and set
Query type: to
Stored procedure.
Query text should contain only stored procedure name, nothing else. If you do not need to use parameters in the stored procedure you can simply use query repeater and specify the query name which executes the stored procedure without parameters.
Best regards,
Michal Legen