Command.ExecuteNonquery()
when am trying to execute a stored proc by using command.executenonquery() it was giving me the return value as -1, where I have to get 1 value. In the stored proc am doing inserting and updating , am inserting the orderid from order table into orderevent table(which has a trigger on orderevent table) and updating the status of an order in order table, please if anyone knows the solution let me know . Thanks in advance

Jignesh TrivediPosted Apr 22, 2014, 3:44 AM
hi,
it might, your store procedure has no return value.
you can specify the return value using return keyword
Like
Create proc #testsp
as
begin
insert into #temp values(1)
return 0
end
hope this will help you.
Kunal VaishyaPosted Apr 22, 2014, 2:03 AM