R
Roger Jordan
Hello,
I'm using a SQLDataSource with name SqlDataSource1, the DeleteCommand
has a parameter, with isdefined in SqlDataSource.DeleteParameter:
DELETE FROM [testTable] WHERE [ID]=@ID
The parameter is not bind to any control, cookie or something like this.
How do I set a value for this parameter before calling the
SQLDataSource1.Delete() method?
As SqlDatasource1.DeleteParamters is of type ParameterCollection (and not
SqlParameter) there is no "value" property.
I like to use it in a for ()-Statement to delete a number of elements, so i
each step I want to set the parameter and then call the delete() method.
I'm using MS SQL Server 2005 and Visual Studio 2005 with C#.
Thanks for you help
Roger
I'm using a SQLDataSource with name SqlDataSource1, the DeleteCommand
has a parameter, with isdefined in SqlDataSource.DeleteParameter:
DELETE FROM [testTable] WHERE [ID]=@ID
The parameter is not bind to any control, cookie or something like this.
How do I set a value for this parameter before calling the
SQLDataSource1.Delete() method?
As SqlDatasource1.DeleteParamters is of type ParameterCollection (and not
SqlParameter) there is no "value" property.
I like to use it in a for ()-Statement to delete a number of elements, so i
each step I want to set the parameter and then call the delete() method.
I'm using MS SQL Server 2005 and Visual Studio 2005 with C#.
Thanks for you help
Roger