Hello,
At first, I would like to point you to the following section of Developer’s guide about
using API and CMS controls outside CMS project.
In terms of executing a stored procedure, 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););
Best regards,
Michal Legen