Some tasks are just too complicated for dynamic query building and/or require a greater level of control. To handle this, SubSonic supports stored procedures. Each stored procedure will produce an equivalent static method in the class defined in the configuration file. By default this is SPs. Each method will have one parameter for each stored procedure parameter and return a StoredProcedure object.
SubSonic.StoredProcedure sp = SPs.CustOrderHist(customerID);
The stored procedure can then either call Execute, ExecuteScalar, GetDataSet or GetReader to execute and return the data.
GridView1.DataSource = sp.GetReader();
Or combining the two statements into one:
GridView1.DataSource = SPs.CustOrderHist(customerID).GetReader();
You can also work with the QueryCommand by referencing the Command property.
Find the entire series of posts here.