Peter Hacker

Peter Hacker

  • NA
  • 11
  • 1.7k

Execute other stored procedures from C#

Nov 16 2017 3:32 PM
Hi all,
 
Does anyone knows how to execute a stored procedure in c# that are in a different schema besides [dbo]?
 
Lets sat that my stored procedures on DB are separated by schemes, how can I use c# to access them regardless they are in the dbo schema?
 
Below is the code that I normally use:
 
...
SqlCmd.CommandText = "procedure name;
SqlCmd.CommandType = CommandType.StoredProcedure;
...
 
Thanks in advance

Answers (4)