Did you retype the following code, or was it copied and pasted.
ObjectDataSource1.SelectParameters.Add("Department ID", ("1");
I ask because if you notice, you are passing the second parameter as ("1"),
which is incorrect. In this case just remove the extra ( right before the
"1";
The next issue though, would be the "1". Are you trying to pass a default
value? If so then you'll need to look closer at the parameter constructor
definition. It expects the second parameter passed into the constructor to
be a TypeCode as in
ObjectDataSource1.SelectParameters.Add("Department ID",TypeCode.Int32);
that could also get you an error if you are trying to pass a default value
isntead.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
"Paul" <Pa**@discussions.microsoft.comwrote in message
news:12**********************************@microsof t.com...
Hi I am using a dataobject and trying to add two select parameters as
follows:
ObjectDataSource1.SelectParameters.Clear();
ObjectDataSource1.SelectParameters.Add("Department ID", ("1");
ObjectDataSource1.SelectParameters.Add("Active", "1");
I get the error message that makes it appear that the parameters are not
being added, thanks.
--
Paul G
Software engineer.