Skip to content

Best Way to call stored procedure from c#

shan nathan

Asked Mar 22, 2015, 10:17 PM EDT2 answers
Share
LinkedInX
Hi there,
  Hope all are fine....
  Here i want to know some information from you.  There are two ways to call stored procedure from c# (as far as i know).
1. create a commandtype.storedprocedure and assign sp name to that. 
Then add parameter and call.
2. Create a command that contains (call sp_name(?,?,?)) and assign parameter value to '?' and execute.
 
I want to know which is best way means which will give fastest output return.... pls help me...
 
 Thanks in advance... 

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Try using SQLHelper of Microsoft Application Blocks for Data Access.
    0
  • 0
    Hi rajat, Thanks for the reply. I am using mysql db. so do i have to use mysqlhelper class..?
    0