开发者

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;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜