views:

9

answers:

0

I am trying to add a selectparameter to my sqldatasource (SqlDS) using this code:

SqlDS.SelectParameters.Add(New Parameter("@approver", Data.DbType.String, "approved"))

The error I keep getting is System.Data.SqlClient.SqlException: Must declare the variable '@approver'.

Is there a specific event I need to use this code within?

Thanks