Click here to Skip to main content
16,018,818 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
please give the front end and back code of update and delete by using stored procedure
Posted
Updated 18-Apr-12 23:34pm
v2
Comments
Sandeep Mewara 19-Apr-12 5:37am    
Demanding and no effort made. Awesome!
Member 8850033 19-Apr-12 5:42am    
sorry sir,i got it

C#
using (SqlConnection con = new SqlConnection(strConnect))
    {
    con.Open();
    using (SqlCommand com = new SqlCommand("proc_update", con))
        {
        com.CommandType = CommandType.StoredProcedure;
        com.Parameters.AddWithValue("@uid", "My new uid");
        com.Parameters.AddWithValue("@uname", "My new uname");
        com.Parameters.AddWithValue("@uip", "My new uip");
        com.ExecuteNonQuery();
        }

Delete would be much the same...
 
Share this answer
 
This is how you can create
Stored Procedures[^]

Here you can get an example:
Click Here[^]

A good article on CP
Insert and retrieve data through stored procedure[^]

Refer this to Insert Single Value With Stored Procedure[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900