Click here to Skip to main content
Sign Up to vote bad
good
See more: C#3.0SQL-Server
I am working on a desktop application..I want to know how to create a stored procedure,how to call the stored procedure ,how to compile and execute it.
Thanks in advance.
Posted 14 Jun '12 - 4:09


2 solutions

  Permalink  
Comments
losmac - 14 Jun '12 - 13:26
Good answer, my 5!
Sandeep Mewara - 15 Jun '12 - 2:57
Thanks Mac :)
shilpa sonawane - 16 Jun '12 - 2:10
Thanks alot..
Sandeep Mewara - 16 Jun '12 - 2:23
Welcome.
Hi,
 

Here is the sample stored procedure for You are reference
 

eg: CREATE PROCEDER dbo.sp_test
(
@id int
)
as

select name from person where id=@id
 
execute procedure like
 

eg: exec dbo.sp_test 23
Here id=23
and it gives the name of id 23
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 364
1 Arun Vasu 223
2 OriginalGriff 190
3 CPallini 163
4 Aarti Meswania 158
0 Sergey Alexandrovich Kryukov 10,169
1 OriginalGriff 7,749
2 CPallini 4,181
3 Rohan Leuva 3,482
4 Maciej Los 3,089


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 14 Jun 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid