Click here to Skip to main content
16,018,653 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hi, Coders.
I Am new to C#, Can you please explain me what is Stored Procedure in C#, please explain me How can we create and retrieve stored procedures in C#,

Regards,
Binayram.R
Posted

Sorry, but your question makes no sense.

Stored procedure (SP) is not not related with C# and vice versa. Stored procedure[^] is similar to the procedure in other programming languages, but it's executed on SQL Server side. You can't write SP in C#. SP is written in SQL - Structured Query Language[^], even if you create command (query) in code.

To create SP, you need to run MS SQL Management Studio[^].
Create a Stored Procedure[^]
Modify a Stored Procedure[^]

After SP creation, you are able to use it in C# code:
How to: Create and Execute an SQL Statement that Returns Rows[^]
How to: Create and Execute an SQL Statement that Returns a Single Value[^]
How to: Create and Execute an SQL Statement that Returns No Value[^]
 
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