This is a migrated thread and some comments may be shown as answers.

[Solved] DeleteCommand

2 Answers 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 20 May 2008, 09:59 AM
Hi,
I have the radgrid working great with regards to inserting, deleting and updating records.
However, at the moment i am using SQL statements in code.
Eg,     DELETE FROM Customer WHERE CustomerID = @CustomerID
          INSERT INTO...
etc.
What i would like to use are Stored Procedures, but it does not seem to allow me.
I have a Stored Procedure for the SELECT command and this works..

How can i get Stored Procedure to work within the commands..?
EG, "usp_DELETE_Customer @CustomerID"

Thanks
Mark

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 20 May 2008, 10:06 AM
Hi Mark,

Check out the following code library link.
Update/Insert/Delete with stored procedures and SqlDataSource control

Thanks
Princy.
0
Mark
Top achievements
Rank 1
answered on 20 May 2008, 10:10 AM
That was a quick answer !!
Thanks,  realised from your help i needed

.DeleteCommandType = SqlDataSourceCommandType.StoredProcedure

Mark

Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Mark
Top achievements
Rank 1
Share this question
or