views:

7

answers:

1

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 sender, ObjectDataSourceSelectingEventArgs e)
    {
        e.Command.Parameters.Add(memberid);
    }   

Can anyone point out, the no doubt stupid, error in my ways?

Any help gratefully received.

A: 

Sorted - being lazy - sorry.

Stuck this into the page load event instead : )

sqlSPSuppliers.SelectParameters["MemberId"].DefaultValue = memberid;

Ricardo Deano