4
Answers

Execute other stored procedures from C#

Peter Hacker

Peter Hacker

6y
204
1
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)