1
Answer

How to call SQL procedure in c# without parameters

Photo of Riaz Hussain

Riaz Hussain

5y
438
1
I made a table whrere from I want to get sum of total days (din) group by PtR number. here is query:
  1. ALTER PROCEDURE getdays  
  2. @tr_ptr nvarchar(6), @tr_din nvarchar(2), @Total int output  
  3. AS  
  4. BEGIN  
  5. SELECT Total = SUM (CONVERT(int, tr_din)) FROM Treatments GROUP BY tr_ptr  
  6. END  
I want to get sum result in my label of form by clicking the button, please guide me how to complete this job

Answers (1)