Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello

I have a question, i want to design a page in which all the data has to be inserted updated and deleted. The data has to be stored in sql server. i have created a table for that, can anyone help me for how to create a stored procedure for this and c# code to inset update and delete data.
Posted
Comments
virang_21 12-Jun-12 0:14am    
There is a Google for that ... Try before you ask for help otherwise you never learn..

Stored procedures (sprocs) are generally an ordered series of Transact-SQL statements bundled into a single logical unit.

They allow for variables and parameters, as well as selection and looping constructs.

A key point is that sprocs are stored in the database rather than in a separate file.

To call stored procedures in C#, please refer:
Update/Insert/Delete with stored procedures and SqlDataSource control[^]
Insert Single Value With Stored Procedure ASP.NET C#[^]
Stored Procedures with ASP.NET[^]
Insert,Update and Delete Using Grid View and ObjectDataSource[^]

And the best one:
Google[^]
 
Share this answer
 
Comments
Rahul Rajat Singh 12-Jun-12 0:31am    
good answer. +5.
Prasad_Kulkarni 12-Jun-12 0:34am    
Thank you Rahul!
Manas Bhardwaj 12-Jun-12 2:07am    
correct +5!
Prasad_Kulkarni 12-Jun-12 3:48am    
Thank you Manas!
Sk. Tajbir 12-Jun-12 2:17am    
Nice,5+
The answer by Mr. Prasad Kulkarni is perfect. you can refer that to see how to create stored procedures. If you want to understand how to use C#/ADO.NET to use these stored procedures then perhaps this could be useful.

A Beginner's Tutorial for Understanding ADO.NET[^]

Note: It is always a good idea to learn ADO.NET even if you are using auto generated code and/or ORMs.
 
Share this answer
 
Comments
Prasad_Kulkarni 12-Jun-12 0:34am    
Good suggestion +5!
AshishChaudha 12-Jun-12 0:50am    
my 5
Hello
For that you have write only one store procedure
here find this articels..

http://www.c-sharpcorner.com/UploadFile/rohatash/select-insert-update-delete-using-stored-procedure-in-sql/[^]

If any query fill free to contact
Thank You
 
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