SQL stored procedure equivalent to ODS e.InputParamters[] = x?
Morning all, hope everyone is ok.
I have an ODS that uses a combination of query string and Selecting event parameters.
For the ODS, I'd input a paramater in the selection event a la:
protected void oDs_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters["memberid"] = memberid;
}
How would I do something along the same lines in a SQL data source?
I have tried the following but without success:
protected void SQL_Selecting(object s开发者_开发问答ender, ObjectDataSourceSelectingEventArgs e)
{
e.Command.Parameters.Add(memberid);
}
Can anyone point out, the no doubt stupid, error in my ways?
Any help gratefully received.
Sorted - being lazy - sorry.
Stuck this into the page load event instead : )
sqlSPSuppliers.SelectParameters["MemberId"].DefaultValue = memberid;
精彩评论