step into a SQL server 2008 R2 proceudure from C# Visual Studio 2013 ? -
in c# code, need debug store procedure in sql server 2008 r2 visual studio 2013.
i followed solution here:
how debug sql server t-sql in visual studio 2012
i can select "application debugging" whole server not 1 database if want debugging.
but, need debug 1 procedure on 1 server !!!
my c#:
//call procedure cmd = new sqlcommand("sql_server_2008_my_procedure", connection); cmd.commandtype = commandtype.storedprocedure; sqlparameter retval = cmd.parameters.add("@my_return_value", sqldbtype.tinyint); retval.direction = parameterdirection.returnvalue; cmd.executenonquery(); // can step store procedure here ? int my_return_value = (int)cmd.parameters["@my_return_value"].value; using (sqldatareader myreader = cmd.executereader()) { if (my_return_value == 1) { throw new exception("sql_server_2008_my_procedure return wrong status !"); } while (reader.read()) { int s = reader.getint32(0) // ... } }
and, in c# debug status, cannot step procedure though have set "application debugging" in sql server object explorer of vs 2013.
where can step procedure ?
thanks !
do have problem procedure? check value of parameter , test in ssms caling same value
Comments
Post a Comment